Struct oidc_jwt_validator::Validator
source · pub struct Validator { /* private fields */ }Expand description
Primary interface used for validating JWTs.
Implementations§
source§impl Validator
impl Validator
pub async fn new( oidc_issuer: impl AsRef<str>, http_client: Client, cache_strat: Strategy, validation: ValidationSettings ) -> Result<Validator, FetchError>
sourcepub async fn validate<T>(
&self,
token: impl AsRef<str>
) -> Result<TokenData<T>, ValidationError>where
T: for<'de> Deserialize<'de>,
pub async fn validate<T>( &self, token: impl AsRef<str> ) -> Result<TokenData<T>, ValidationError>where T: for<'de> Deserialize<'de>,
Validates a JWT, Returning the claims serialized into type of T
Trait Implementations§
Auto Trait Implementations§
impl !RefUnwindSafe for Validator
impl Send for Validator
impl Sync for Validator
impl Unpin for Validator
impl !UnwindSafe for Validator
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