#[non_exhaustive]pub enum ExchangeError {
UnsupportedGrant(String),
UnsupportedTokenType(String),
SubjectInvalid(IdentityError),
ScopeExceedsSubject(String),
EmptyIntersection,
SubjectExpired,
MissingSubjectChain,
InvalidScopes,
SigningFailed(String),
DelegationExceeded {
depth: usize,
max: usize,
},
TargetNotAllowed(String),
ActorNotDirect,
}Expand description
Errors from the exchange process.
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.
UnsupportedGrant(String)
The grant_type is not the RFC 8693 token exchange URI.
UnsupportedTokenType(String)
The subject_token_type is not urn:ietf:params:oauth:token-type:jwt.
SubjectInvalid(IdentityError)
The inbound subject token failed identity validation.
ScopeExceedsSubject(String)
The requested scope is not a subset of the subject’s scopes.
EmptyIntersection
Scope intersection produced an empty set.
SubjectExpired
The subject has no remaining lifetime to delegate.
MissingSubjectChain
The caller failed to supply a verified source chain.
InvalidScopes
A scope request exceeds the supported count or field limits.
SigningFailed(String)
Token signing failed.
DelegationExceeded
The resulting delegation chain exceeds the maximum allowed depth.
TargetNotAllowed(String)
The requested audience is not a configured backend name.
ActorNotDirect
The actor token is itself delegated; it must directly identify the acting agent.
Trait Implementations§
Source§impl Debug for ExchangeError
impl Debug for ExchangeError
Source§impl Display for ExchangeError
impl Display for ExchangeError
Source§impl Error for ExchangeError
impl Error for ExchangeError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
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
fn description(&self) -> &str
👎Deprecated since 1.42.0:
use the Display impl or to_string()
Source§impl From<IdentityError> for ExchangeError
impl From<IdentityError> for ExchangeError
Source§fn from(source: IdentityError) -> Self
fn from(source: IdentityError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for ExchangeError
impl RefUnwindSafe for ExchangeError
impl Send for ExchangeError
impl Sync for ExchangeError
impl Unpin for ExchangeError
impl UnsafeUnpin for ExchangeError
impl UnwindSafe for ExchangeError
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more