pub struct JwtContext { /* private fields */ }Expand description
Simple JWT-based authentication context example
Implementations§
Trait Implementations§
Source§impl AuthenticationContext for JwtContext
impl AuthenticationContext for JwtContext
Source§fn get_user_id(&self) -> &Self::UserId
fn get_user_id(&self) -> &Self::UserId
Get the user ID from the authentication context
Source§fn get_granted_scopes(&self) -> Vec<String>
fn get_granted_scopes(&self) -> Vec<String>
Get any granted scopes from the authentication context
These are typically permissions granted directly via tokens
Source§fn get_context(&self) -> &Self::ContextData
fn get_context(&self) -> &Self::ContextData
Get additional context data
Auto Trait Implementations§
impl Forget for JwtContext
impl Freeze for JwtContextwhere
*const u8 is !null: Freeze,
PhantomData<u8>: Freeze,
PhantomData<String>: Freeze,
PhantomData<(String, String)>: Freeze,
impl Move for JwtContext
impl RefUnwindSafe for JwtContext
impl Send for JwtContext
impl Sync for JwtContext
impl Unpin for JwtContext
impl UnsafeUnpin for JwtContextwhere
*const u8 is !null: UnsafeUnpin,
PhantomData<u8>: UnsafeUnpin,
PhantomData<String>: UnsafeUnpin,
PhantomData<(String, String)>: UnsafeUnpin,
impl UnwindSafe for JwtContext
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