#[non_exhaustive]pub enum KeyReferenceError {
Missing,
RelativeKidWithoutIssuer(String),
InvalidKid {
kid: String,
source: DidError,
},
KidWithParameters(DidUrl),
InvalidJwk(String),
InvalidX5c(String),
InvalidUrl {
parameter: &'static str,
value: String,
reason: String,
},
UnsupportedConfirmation(String),
}Expand description
Why a token names no key this crate can look for.
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.
Missing
The token names no key: no kid, jwk, x5c or jku (or, in cnf, no jwk, kid
or jku).
RelativeKidWithoutIssuer(String)
The kid is a #fragment and iss is not a DID to resolve it against.
InvalidKid
The kid is neither a DID URL nor anything else the token resolves it with.
KidWithParameters(DidUrl)
The kid carries a path or DID parameters. versionId and versionTime could select a
document version that still lists a retired key, so only did:…#fragment keys are
accepted.
InvalidJwk(String)
The key by value is not usable: it holds private material, say.
InvalidX5c(String)
The x5c header is not an array of base64 certificates.
InvalidUrl
A URL parameter (jku) is not an absolute URL.
Fields
UnsupportedConfirmation(String)
The confirmation names its key only by a method the crate does not resolve, such as
x5t#S256 or jwe.
Trait Implementations§
Source§impl Debug for KeyReferenceError
impl Debug for KeyReferenceError
Source§impl Display for KeyReferenceError
impl Display for KeyReferenceError
Source§impl Error for KeyReferenceError
impl Error for KeyReferenceError
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<KeyReferenceError> for JwtValidationError
impl From<KeyReferenceError> for JwtValidationError
Source§fn from(source: KeyReferenceError) -> Self
fn from(source: KeyReferenceError) -> Self
Converts to this type from the input type.
Source§impl From<KeyReferenceError> for ValidationError
Available on crate feature vc only.
impl From<KeyReferenceError> for ValidationError
Available on crate feature
vc only.Source§fn from(source: KeyReferenceError) -> Self
fn from(source: KeyReferenceError) -> Self
Converts to this type from the input type.
Auto Trait Implementations§
impl Freeze for KeyReferenceError
impl RefUnwindSafe for KeyReferenceError
impl Send for KeyReferenceError
impl Sync for KeyReferenceError
impl Unpin for KeyReferenceError
impl UnsafeUnpin for KeyReferenceError
impl UnwindSafe for KeyReferenceError
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