pub struct TokenValidator { /* private fields */ }Expand description
Token validator
Implementations§
Source§impl TokenValidator
impl TokenValidator
Sourcepub fn with_clock_skew(self, seconds: i64) -> Self
pub fn with_clock_skew(self, seconds: i64) -> Self
Set clock skew tolerance
Sourcepub fn validate_claims(
&self,
claims: &IdTokenClaims,
expected_nonce: Option<&str>,
) -> Result<()>
pub fn validate_claims( &self, claims: &IdTokenClaims, expected_nonce: Option<&str>, ) -> Result<()>
Validate ID token claims (without cryptographic verification)
Note: For production, you should also verify the JWT signature using the provider’s JWKS.
Sourcepub fn decode_jwt_claims(token: &str) -> Result<IdTokenClaims>
pub fn decode_jwt_claims(token: &str) -> Result<IdTokenClaims>
Decode JWT without verification (for extracting claims)
WARNING: This does not verify the signature. For production use, you should use a proper JWT library that verifies signatures.
Auto Trait Implementations§
impl Freeze for TokenValidator
impl RefUnwindSafe for TokenValidator
impl Send for TokenValidator
impl Sync for TokenValidator
impl Unpin for TokenValidator
impl UnwindSafe for TokenValidator
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