pub struct StaticTokens { /* private fields */ }Expand description
Maps a fixed set of bearer tokens to fixed principals.
The successor to StaticToken: instead of one
shared secret gating the whole server, each token names a distinct principal,
so a small multi-user deployment gets per-caller identity and authorization
without an external issuer.
Implementations§
Trait Implementations§
Source§impl Clone for StaticTokens
impl Clone for StaticTokens
Source§fn clone(&self) -> StaticTokens
fn clone(&self) -> StaticTokens
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for StaticTokens
impl Debug for StaticTokens
Source§impl Default for StaticTokens
impl Default for StaticTokens
Source§fn default() -> StaticTokens
fn default() -> StaticTokens
Returns the “default value” for a type. Read more
Source§impl IdentityProvider for StaticTokens
impl IdentityProvider for StaticTokens
Source§fn name(&self) -> &str
fn name(&self) -> &str
A short name recorded in
Principal::provider and logs.Source§fn authenticate(
&self,
credentials: &Credentials,
) -> Result<Option<Principal>, AuthError>
fn authenticate( &self, credentials: &Credentials, ) -> Result<Option<Principal>, AuthError>
Authenticates
credentials. Read moreAuto Trait Implementations§
impl Freeze for StaticTokens
impl RefUnwindSafe for StaticTokens
impl Send for StaticTokens
impl Sync for StaticTokens
impl Unpin for StaticTokens
impl UnsafeUnpin for StaticTokens
impl UnwindSafe for StaticTokens
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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