Enum jwt_compact::ParseError [−][src]
#[non_exhaustive]
pub enum ParseError {
InvalidTokenStructure,
InvalidBase64Encoding,
MalformedHeader(Error),
UnsupportedContentType(String),
}
Expand description
Errors that may occur during token parsing.
Variants (Non-exhaustive)
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
InvalidTokenStructure
Token has invalid structure.
Valid tokens must consist of 3 base64url-encoded parts (header, claims, and signature) separated by periods.
InvalidBase64Encoding
Cannot decode base64.
MalformedHeader(Error)
Tuple Fields
0: Error
Token header cannot be parsed.
UnsupportedContentType(String)
Tuple Fields
0: String
Content type mentioned in the token header is not supported.
Supported content types are JSON (used by default) and CBOR (only if the serde_cbor
crate feature is enabled, which it is by default).