pub struct StaticBearerResolver { /* private fields */ }Expand description
Resolves opaque bearer tokens against a pre-loaded identity map.
This is the existing MACP_AUTH_TOKENS_JSON mechanism.
Implementations§
Source§impl StaticBearerResolver
impl StaticBearerResolver
pub fn new(identities: HashMap<String, AuthIdentity>) -> StaticBearerResolver
Trait Implementations§
Source§impl AuthResolver for StaticBearerResolver
impl AuthResolver for StaticBearerResolver
fn name(&self) -> &str
fn resolve<'life0, 'life1, 'async_trait>(
&'life0 self,
metadata: &'life1 MetadataMap,
) -> Pin<Box<dyn Future<Output = Result<Option<ResolvedIdentity>, AuthError>> + Send + 'async_trait>>where
'life0: 'async_trait,
'life1: 'async_trait,
StaticBearerResolver: 'async_trait,
Auto Trait Implementations§
impl Freeze for StaticBearerResolver
impl RefUnwindSafe for StaticBearerResolver
impl Send for StaticBearerResolver
impl Sync for StaticBearerResolver
impl Unpin for StaticBearerResolver
impl UnsafeUnpin for StaticBearerResolver
impl UnwindSafe for StaticBearerResolver
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request