Function bbjwt::validate_jwt
source · pub async fn validate_jwt(
jwt: &str,
validation_steps: &Vec<ValidationStep>,
keystore: &KeyStore
) -> BBResult<JWTClaims>
Expand description
Validate a JWT.
This function decodes the token string (base64) and then validates it. Encrypted JWTs are not supported (yet?).
§Arguments
jwt
- Base64 encoded JWT to validatevalidation_steps
- what to validatekeystore
- the keystore containing public keys to verify the JWT’s signature.
§Returns
All claims found in the JWT on success.