pub enum ClaimFault {
Expired,
NotYetValid,
IssuedInFuture,
NotInAudience,
Unparsable,
NotANumber(&'static str),
AudienceNotStrings,
}Expand description
What was wrong with a token’s claims.
Separate from the failures above because a token whose claims are wrong was read successfully: the signature verified, the server has the right key, and what remains is a disagreement about the claims themselves. A client that cannot tell those apart cannot tell “rotate your key” from “your clock is wrong”.
Variants§
Expired
exp is in the past.
NotYetValid
nbf is in the future: the token is valid, but not yet.
IssuedInFuture
iat is in the future, which usually means the two clocks disagree
rather than that the token is forged.
NotInAudience
aud is present and does not list the audience this server accepts.
Unparsable
The payload decoded but is not a JSON object of claims.
NotANumber(&'static str)
A timestamp claim that is present and is not a timestamp.
AudienceNotStrings
aud is present and is neither a string nor an array of strings.
Trait Implementations§
Source§impl Clone for ClaimFault
impl Clone for ClaimFault
impl Copy for ClaimFault
Source§impl Debug for ClaimFault
impl Debug for ClaimFault
Source§impl Display for ClaimFault
impl Display for ClaimFault
impl Eq for ClaimFault
Source§impl Error for ClaimFault
impl Error for ClaimFault
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()