[][src]Function jsonwebtoken::verify

pub fn verify(
    signature: &str,
    signing_input: &str,
    key: &[u8],
    algorithm: Algorithm
) -> Result<bool>

Compares the signature given with a re-computed signature for HMAC or using the public key for RSA.

Only use this function if you want to do something other than JWT.

signature is the signature part of a jwt (text after the second '.')

signing_input is base64(header) + "." + base64(claims)