RustyJwtError

Enum RustyJwtError 

pub enum RustyJwtError {
Show 37 variants JwtSimpleError(Error), Sec1Error(Error), UrlParseError(ParseError), UuidError(Error), Utf8Error(Utf8Error), Base64DecodeError(DecodeError), JsonError(Error), InvalidHtu(Url, &'static str), InvalidHtm(String), InvalidDpopJwk, InvalidJwkThumbprint, InvalidDpopIat, DpopNotYetValid, InvalidToken(String), MissingDpopHeader(&'static str), InvalidDpopTyp, TokenSubMismatch, MissingIssuer, TokenExpired, TokenLivesTooLong, MissingTokenClaim(&'static str), InvalidAudience, DpopNonceMismatch, DpopHandleMismatch, DpopDisplayNameMismatch, DpopTeamMismatch, DpopChallengeMismatch, DpopHtuMismatch, DpopHtmMismatch, UnsupportedAlgorithm, InvalidBackendKeys(&'static str), InvalidClientId, UnsupportedApiVersion, UnsupportedScope, InvalidHandle, InvalidIdentifierScheme(String), ImplementationError,
}
Expand description

All errors which [crate::RustyJwtTools] might throw

Variants§

§

JwtSimpleError(Error)

JWT error from jwt-simple crate

§

Sec1Error(Error)

Elliptic curve error

§

UrlParseError(ParseError)

Invalid URL

§

UuidError(Error)

Invalid UUID

§

Utf8Error(Utf8Error)

UTF-8 parsing error

§

Base64DecodeError(DecodeError)

Base64 decoding error

§

JsonError(Error)

Json error

§

InvalidHtu(Url, &'static str)

Invalid URL

§

InvalidHtm(String)

Invalid HTTP method

§

InvalidDpopJwk

Invalid DPoP proof jwk

§

InvalidJwkThumbprint

JWK thumbprint mismatches JWK in header

§

InvalidDpopIat

DPoP ‘iat’ claim is issued in the future

§

DpopNotYetValid

DPoP ‘nbf’ claim is issued in the future

§

InvalidToken(String)

JWT token verification failed

§

MissingDpopHeader(&'static str)

DPoP token lacks header field

§

InvalidDpopTyp

DPoP token should have a ‘typ’ header field equal to ‘dpop+jwt’

§

TokenSubMismatch

DPoP token ‘sub’ claim mismatches with the expected one

§

MissingIssuer

Claim ‘iss’ is missing while required

§

TokenExpired

JWT token is expired

§

TokenLivesTooLong

JWT token expiry is later than supplied threshold

§

MissingTokenClaim(&'static str)

JWT token token lacks a claim

§

InvalidAudience

JWT token has an invalid “aud” claim

§

DpopNonceMismatch

DPoP token ‘nonce’ claim mismatches with the expected [crate::prelude::BackendNonce]

§

DpopHandleMismatch

DPoP token ‘handle’ claim mismatches with the expected handle

§

DpopDisplayNameMismatch

DPoP token display name claim mismatches with the expected handle

§

DpopTeamMismatch

DPoP token ‘team’ claim mismatches with the expected team

§

DpopChallengeMismatch

DPoP token ‘chal’ claim mismatches with the expected [crate::prelude::AcmeNonce]

§

DpopHtuMismatch

DPoP token ‘htu’ claim mismatches with the expected uri

§

DpopHtmMismatch

DPoP token ‘htm’ claim mismatches with the expected method

§

UnsupportedAlgorithm

Unsupported algorithm

§

InvalidBackendKeys(&'static str)

Supplied backend keys have an invalid format

§

InvalidClientId

§

UnsupportedApiVersion

Verified a token with an unsupported wire-server API version

§

UnsupportedScope

Verified a token with an unsupported scope

§

InvalidHandle

Handle claim is in the wrong format

§

InvalidIdentifierScheme(String)

Invalid identifier (client id or handle) scheme

§

ImplementationError

We have done something terribly wrong

Trait Implementations§

§

impl Debug for RustyJwtError

§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Display for RustyJwtError

§

fn fmt(&self, __formatter: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
§

impl Error for RustyJwtError

§

fn source(&self) -> Option<&(dyn Error + 'static)>

Returns the lower-level source of this error, if any. Read more
1.0.0 · Source§

fn description(&self) -> &str

👎Deprecated since 1.42.0: use the Display impl or to_string()
1.0.0 · Source§

fn cause(&self) -> Option<&dyn Error>

👎Deprecated since 1.33.0: replaced by Error::source, which can support downcasting
Source§

fn provide<'a>(&'a self, request: &mut Request<'a>)

🔬This is a nightly-only experimental API. (error_generic_member_access)
Provides type-based access to context intended for error reports. Read more
§

impl From<DecodeError> for RustyJwtError

§

fn from(source: DecodeError) -> RustyJwtError

Converts to this type from the input type.
§

impl From<Error> for RustyJwtError

§

fn from(source: Error) -> RustyJwtError

Converts to this type from the input type.
§

impl From<Error> for RustyJwtError

§

fn from(source: Error) -> RustyJwtError

Converts to this type from the input type.
§

impl From<Error> for RustyJwtError

§

fn from(source: Error) -> RustyJwtError

Converts to this type from the input type.
§

impl From<Error> for RustyJwtError

§

fn from(source: Error) -> RustyJwtError

Converts to this type from the input type.
§

impl From<ParseError> for RustyJwtError

§

fn from(source: ParseError) -> RustyJwtError

Converts to this type from the input type.
Source§

impl From<RustyJwtError> for E2eIdentityError

Source§

fn from(source: RustyJwtError) -> Self

Converts to this type from the input type.
Source§

impl From<RustyJwtError> for RustyAcmeError

Source§

fn from(source: RustyJwtError) -> Self

Converts to this type from the input type.
§

impl From<Utf8Error> for RustyJwtError

§

fn from(source: Utf8Error) -> RustyJwtError

Converts to this type from the input type.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToString for T
where T: Display + ?Sized,

Source§

fn to_string(&self) -> String

Converts the given value to a String. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

§

fn vzip(self) -> V

§

impl<T> ErasedDestructor for T
where T: 'static,

§

impl<T> MaybeSendSync for T