Skip to main content

validate_claim

Function validate_claim 

Source
fn validate_claim<T: DeserializeOwned>(
    token: &str,
    key: &JwtKey,
) -> Result<T, ControllerError>
Expand description

Decodes a claim, reporting a bad token as a request error rather than a JWT one.

validate_hs256_claim is the raw form that leaves the jsonwebtoken error unmapped, for the claims that report it differently.