Struct jwtk::jwk::JwkSetVerifier
source · pub struct JwkSetVerifier { /* private fields */ }
Expand description
Jwk set parsed and converted, ready to verify tokens.
Implementations§
source§impl JwkSetVerifier
impl JwkSetVerifier
sourcepub fn set_require_kid(&mut self, required: bool)
pub fn set_require_kid(&mut self, required: bool)
If called with false
, subsequent verify
and verify_only
calls will
try all keys from the key set if a kid
is not specified in the token.
pub fn find(&self, kid: &str) -> Option<&SomePublicKey>
sourcepub fn verify<ExtraClaims: DeserializeOwned>(
&self,
token: &str
) -> Result<HeaderAndClaims<ExtraClaims>>
pub fn verify<ExtraClaims: DeserializeOwned>( &self, token: &str ) -> Result<HeaderAndClaims<ExtraClaims>>
Decode and verify token with keys from this JWK set.
The alg
, exp
and nbf
fields are automatically checked.
sourcepub fn verify_only<ExtraClaims: DeserializeOwned>(
&self,
token: &str
) -> Result<HeaderAndClaims<ExtraClaims>>
pub fn verify_only<ExtraClaims: DeserializeOwned>( &self, token: &str ) -> Result<HeaderAndClaims<ExtraClaims>>
Decode and verify token with keys from this JWK set. Won’t check exp
and nbf
.
Auto Trait Implementations§
impl RefUnwindSafe for JwkSetVerifier
impl Send for JwkSetVerifier
impl Sync for JwkSetVerifier
impl Unpin for JwkSetVerifier
impl UnwindSafe for JwkSetVerifier
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