#[non_exhaustive]pub enum UrlTokenError {
Length,
Format,
Encoding,
SignatureLength,
Statement(GrantError),
Target,
KeyId,
Signature,
Binding,
Expired,
Lifetime,
Epoch,
}Expand description
Why a statement, token or key configuration is rejected. Every variant
maps to one stable UrlTokenError::reason for the golden vectors.
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.
Length
The token is longer than any valid token can be.
Format
Not exactly two nonempty base64url segments joined by ..
Encoding
A segment is not strict unpadded base64url.
SignatureLength
The signature segment is not 64 bytes.
Statement(GrantError)
A §3.1 statement rule failed.
Target
The target field fails its grammar.
KeyId
The key id is not in the verification set, or its key is retired.
Signature
The Ed25519 signature does not verify strictly.
Binding
The audience, repository or target does not match the request.
Expired
The token’s now is at or past expiry.
Lifetime
expiry - issued exceeds the configured lifetime.
Epoch
The token’s epoch differs from the stored epoch.
Implementations§
Trait Implementations§
Source§impl Clone for UrlTokenError
impl Clone for UrlTokenError
impl Copy for UrlTokenError
Source§impl Debug for UrlTokenError
impl Debug for UrlTokenError
Source§impl Display for UrlTokenError
impl Display for UrlTokenError
impl Eq for UrlTokenError
Source§impl Error for UrlTokenError
impl Error for UrlTokenError
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<GrantError> for UrlTokenError
impl From<GrantError> for UrlTokenError
Source§fn from(source: GrantError) -> Self
fn from(source: GrantError) -> Self
Converts to this type from the input type.
Source§impl PartialEq for UrlTokenError
impl PartialEq for UrlTokenError
impl StructuralPartialEq for UrlTokenError
Auto Trait Implementations§
impl Freeze for UrlTokenError
impl RefUnwindSafe for UrlTokenError
impl Send for UrlTokenError
impl Sync for UrlTokenError
impl Unpin for UrlTokenError
impl UnsafeUnpin for UrlTokenError
impl UnwindSafe for UrlTokenError
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