pub struct JwtService { /* private fields */ }Implementations§
Source§impl JwtService
impl JwtService
pub fn new(config: JwtConfig) -> Self
pub fn generate_token( &self, user_info: &str, data: Option<String>, ) -> Result<String, Error>
pub fn verify_token(&self, token: &str) -> Result<Claims, AuthError>
pub fn get_secret(&self) -> String
pub fn get_expiration(&self) -> i64
pub fn is_ignore_uri(&self, uri: &str, method: &str) -> bool
pub fn methods_to_uppercase(data: &mut [IgnoreUri])
Auto Trait Implementations§
impl Freeze for JwtService
impl RefUnwindSafe for JwtService
impl Send for JwtService
impl Sync for JwtService
impl Unpin for JwtService
impl UnwindSafe for JwtService
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