Function jsonwebtoken::crypto::verify
source · pub fn verify(
signature: &str,
message: &[u8],
key: &DecodingKey,
algorithm: Algorithm
) -> Result<bool>
Expand description
Compares the signature given with a re-computed signature for HMAC or using the public key for RSA/EC.
If you just want to decode a JWT, use decode
instead.
signature
is the signature part of a jwt (text after the second ‘.’)
message
is base64(header) + “.” + base64(claims)