pub struct DefaultJwtManager {
pub secret_key: String,
}Fields§
§secret_key: StringImplementations§
Trait Implementations§
Source§impl TokenManager for DefaultJwtManager
impl TokenManager for DefaultJwtManager
type Token = AuthTokens
type Claims = JwtClaims
type Error = JwtError
fn generate<'life0, 'life1, 'async_trait>(
&'life0 self,
user_id: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Self::Token, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn verify<'life0, 'life1, 'async_trait>(
&'life0 self,
token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Self::Claims, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
fn refresh<'life0, 'life1, 'async_trait>(
&'life0 self,
refresh_token: &'life1 str,
) -> Pin<Box<dyn Future<Output = Result<Self::Token, Self::Error>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Auto Trait Implementations§
impl Freeze for DefaultJwtManager
impl RefUnwindSafe for DefaultJwtManager
impl Send for DefaultJwtManager
impl Sync for DefaultJwtManager
impl Unpin for DefaultJwtManager
impl UnsafeUnpin for DefaultJwtManager
impl UnwindSafe for DefaultJwtManager
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