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 Freeze for JwtContext
impl RefUnwindSafe for JwtContext
impl Send for JwtContext
impl Sync for JwtContext
impl Unpin for JwtContext
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