MCPcopy Create free account
hub / github.com/NVIDIA/OpenShell / call

Method call

crates/openshell-core/src/auth.rs:70–85  ·  view source on GitHub ↗
(
        &mut self,
        mut req: tonic::Request<()>,
    )

Source from the content-addressed store, hash-verified

68
69impl tonic::service::Interceptor for EdgeAuthInterceptor {
70 fn call(
71 &mut self,
72 mut req: tonic::Request<()>,
73 ) -> std::result::Result<tonic::Request<()>, tonic::Status> {
74 if let Some(ref val) = self.bearer_value {
75 req.metadata_mut().insert("authorization", val.clone());
76 }
77 if let Some(ref val) = self.header_value {
78 req.metadata_mut()
79 .insert("cf-access-jwt-assertion", val.clone());
80 }
81 if let Some(ref val) = self.cookie_value {
82 req.metadata_mut().insert("cookie", val.clone());
83 }
84 Ok(req)
85 }
86}

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected