Method
call
(
&mut self,
mut req: tonic::Request<()>,
)
Source from the content-addressed store, hash-verified
| 109 | |
| 110 | impl tonic::service::Interceptor for AuthInterceptor { |
| 111 | fn call( |
| 112 | &mut self, |
| 113 | mut req: tonic::Request<()>, |
| 114 | ) -> std::result::Result<tonic::Request<()>, Status> { |
| 115 | let bearer = self |
| 116 | .bearer |
| 117 | .read() |
| 118 | .expect("auth interceptor token slot poisoned") |
| 119 | .clone(); |
| 120 | req.metadata_mut().insert("authorization", bearer); |
| 121 | Ok(req) |
| 122 | } |
| 123 | } |
| 124 | |
| 125 | /// Build the plain (un-intercepted) gRPC channel. |
Callers
nothing calls this directly
Tested by
no test coverage detected