#[non_exhaustive]pub enum DomainLinkageError {
Show 17 variants
InvalidOrigin(String),
InvalidContext(String),
TypPresent(String),
UnexpectedHeaderParameter(String),
UnexpectedClaim(String),
MissingClaim(&'static str),
IdPresent,
MissingContext,
MissingType,
MissingExpirationDate,
SubjectNotDid(Option<String>),
SubjectMismatch {
role: &'static str,
found: String,
subject: Did,
},
InvalidOriginProperty(Option<Value>),
OriginMismatch {
expected: String,
found: String,
},
Validation(ValidationError),
NoCredentialFor(Did),
NoValidCredential(BTreeMap<usize, DomainLinkageError>),
}domain-linkage only.Expand description
Why a domain linkage credential or configuration did not validate.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
InvalidOrigin(String)
An origin is not scheme://host[:port].
InvalidContext(String)
The configuration’s @context is not CONTEXT.
TypPresent(String)
The JWT header has a typ, which the format forbids.
UnexpectedHeaderParameter(String)
The JWT header has a parameter other than alg and kid.
UnexpectedClaim(String)
The JWT payload has a claim other than iss, sub, nbf, exp and vc.
MissingClaim(&'static str)
A required claim is missing: iss, sub, exp or nbf.
IdPresent
The credential has an id, which the format forbids.
MissingContext
The credential’s context does not include CONTEXT.
MissingType
The credential’s type does not include CREDENTIAL_TYPE.
MissingExpirationDate
The credential has no expirationDate.
SubjectNotDid(Option<String>)
credentialSubject.id is missing or not a DID.
SubjectMismatch
The issuer, iss or sub differs from credentialSubject.id.
Fields
InvalidOriginProperty(Option<Value>)
credentialSubject.origin is missing or not one string.
OriginMismatch
credentialSubject.origin is not the origin the resource was fetched from.
Fields
Validation(ValidationError)
The credential did not decode or validate as a credential JWT.
NoCredentialFor(Did)
The configuration holds no JWT credential for the DID.
NoValidCredential(BTreeMap<usize, DomainLinkageError>)
No credential of the configuration validated; the error of each JWT entry by its position.
Trait Implementations§
Source§impl Debug for DomainLinkageError
impl Debug for DomainLinkageError
Source§impl Display for DomainLinkageError
impl Display for DomainLinkageError
Source§impl Error for DomainLinkageError
impl Error for DomainLinkageError
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()