pub enum TokenError {
InvalidSignature,
NotYetValid,
Expired,
DelegationExhausted,
DelegationNotAllowed,
NotAuthorized,
InvalidFormat,
ReadOnly,
ZeroTtl,
}Expand description
Errors from token operations.
Variants§
InvalidSignature
Token signature is invalid.
NotYetValid
Token is not yet valid (before not_before).
Expired
Token has expired (after not_after).
DelegationExhausted
Delegation depth exhausted.
DelegationNotAllowed
DELEGATE scope not present in token.
NotAuthorized
No valid token found for the requested action.
InvalidFormat
Wire format is too short or malformed.
ReadOnly
Issuer/signer keypair is public-only (post-migration zeroize or other read-only construction). The caller’s signing operation is not possible.
ZeroTtl
duration_secs == 0 was passed to PermissionToken::try_issue.
Pre-fix, a TTL of 0 produced a token with
not_after == not_before, which every receiver immediately
rejects as Expired. The signature verifies but every
authorization check fails — silently. Reject at issue
time so the caller learns about the misuse instead of
minting an unusable token.
Trait Implementations§
Source§impl Clone for TokenError
impl Clone for TokenError
Source§fn clone(&self) -> TokenError
fn clone(&self) -> TokenError
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for TokenError
impl Debug for TokenError
Source§impl Display for TokenError
impl Display 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)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl PartialEq for TokenError
impl PartialEq for TokenError
Source§fn eq(&self, other: &TokenError) -> bool
fn eq(&self, other: &TokenError) -> bool
self and other values to be equal, and is used by ==.impl Eq 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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.