pub struct TokenError {
pub code: &'static str,
pub detail: String,
}Expand description
A token that does not verify.
Fields§
§code: &'static strThe code: invalid_agent_token, invalid_person_token,
invalid_auth_token, malformed_token, unsupported_token_type,
token_type_not_accepted, token_expired, key_binding_failed,
aud_mismatch, clock_skew or invalid_configuration.
token_expired and clock_skew are reported only once the issuer’s
signature has verified, so a presenter can act on them: refresh the
token, or wait out the skew.
detail: StringA human-readable explanation, for logs. Not part of the protocol.
Implementations§
Trait Implementations§
Source§impl Clone for TokenError
impl Clone for TokenError
Source§impl Debug for TokenError
impl Debug for TokenError
Source§impl Display for TokenError
impl Display for TokenError
impl Eq for TokenError
Source§impl Error for TokenError
impl Error for TokenError
1.30.0 · 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<TokenError> for Error
impl From<TokenError> for Error
Source§fn from(source: TokenError) -> Self
fn from(source: TokenError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for TokenError
impl PartialEq for TokenError
impl StructuralPartialEq for TokenError
Auto Trait Implementations§
impl Freeze for TokenError
impl RefUnwindSafe for TokenError
impl Send for TokenError
impl Sync for TokenError
impl Unpin for TokenError
impl UnsafeUnpin for TokenError
impl UnwindSafe for TokenError
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