Skip to main content

verify_jwt

Function verify_jwt 

Source
pub fn verify_jwt(token: &str, secret: &[u8]) -> Option<Claims>
Available on crate feature auth only.
Expand description

Verify a JWT string against secret (HS256 only).

Returns Claims on success. Returns None on any failure: bad format, unsupported algorithm, signature mismatch, or expired exp claim.