pub struct JsonWebToken { /* private fields */ }
Implementations§
source§impl JsonWebToken
impl JsonWebToken
pub fn new(cfg: Arc<Configuration>) -> Self
sourcepub async fn sign(&self, user: UserCompact) -> String
pub async fn sign(&self, user: UserCompact) -> String
Create Json Web Token.
sourcepub async fn verify(&self, token: &str) -> Result<UserClaims, ServiceError>
pub async fn verify(&self, token: &str) -> Result<UserClaims, ServiceError>
Auto Trait Implementations§
impl !RefUnwindSafe for JsonWebToken
impl Send for JsonWebToken
impl Sync for JsonWebToken
impl Unpin for JsonWebToken
impl !UnwindSafe for JsonWebToken
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