pub struct Auth { /* private fields */ }Implementations§
Source§impl Auth
impl Auth
pub fn new() -> AuthResult<Self>
pub fn check(&self, token: &str) -> AuthResult<UserClaims>
Methods from Deref<Target = Jwt>§
pub fn token(&self, uid: String, claims: Option<Value>) -> AuthResult<String>
pub fn validate(&self, token: &str) -> AuthResult<TokenData<UserClaims>>
Trait Implementations§
Source§impl InstanceTrait for Auth
impl InstanceTrait for Auth
type Error = Error
fn register<'life0, 'async_trait>(
_: &'life0 Container,
) -> Pin<Box<dyn Future<Output = Result<Self, ContainerError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
fn name() -> String
fn boot<'async_trait>() -> Pin<Box<dyn Future<Output = Result<(), ContainerError>> + Send + 'async_trait>>where
Self: Sized + 'async_trait,
fn cleanup() -> Result<(), ContainerError>
fn facade() -> &'static Selfwhere
Self: Sized,
Auto Trait Implementations§
impl Freeze for Auth
impl RefUnwindSafe for Auth
impl Send for Auth
impl Sync for Auth
impl Unpin for Auth
impl UnwindSafe for Auth
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