Enum jsonwebtoken::errors::ErrorKind [−]
pub enum ErrorKind {
Msg(String),
Unspecified(Unspecified),
Base64(DecodeError),
Json(Error),
Utf8(FromUtf8Error),
InvalidToken,
InvalidSignature,
InvalidKey,
ExpiredSignature,
InvalidIssuer,
InvalidAudience,
InvalidSubject,
InvalidIssuedAt,
ImmatureSignature,
InvalidAlgorithm,
// some variants omitted
}The kind of an error.
Variants
Msg(String)A convenient variant for String.
Unspecified(Unspecified)An error happened while signing/verifying a token with RSA
Base64(DecodeError)An error happened while decoding some base64 text
Json(Error)An error happened while serializing/deserializing JSON
Utf8(FromUtf8Error)An error happened while trying to convert the result of base64 decoding to a String
InvalidTokenWhen a token doesn't have a valid JWT shape
InvalidSignatureWhen the signature doesn't match
InvalidKeyWhen the secret given is not a valid RSA key
ExpiredSignatureWhen a token’s exp claim indicates that it has expired
InvalidIssuerWhen a token’s iss claim does not match the expected issuer
InvalidAudienceWhen a token’s aud claim does not match one of the expected audience values
InvalidSubjectWhen a token’s aud claim does not match one of the expected audience values
InvalidIssuedAtWhen a token’s iat claim is in the future
ImmatureSignatureWhen a token’s nbf claim represents a time in the future
InvalidAlgorithmWhen the algorithm in the header doesn't match the one passed to decode
Methods
impl ErrorKind
impl ErrorKindpub fn description(&self) -> &str
pub fn description(&self) -> &strA string describing the error kind.
Trait Implementations
impl From<ErrorKind> for Error
impl From<ErrorKind> for Errorimpl Debug for ErrorKind
impl Debug for ErrorKindimpl Display for ErrorKind
impl Display for ErrorKindimpl<'a> From<&'a str> for ErrorKind
impl<'a> From<&'a str> for ErrorKindimpl From<String> for ErrorKind
impl From<String> for ErrorKindimpl From<Error> for ErrorKind
impl From<Error> for ErrorKind