pub struct StatusListCheck<C, R, V = DefaultVerifier> { /* private fields */ }sd-jwt only.Expand description
A StatusCheck for the Token Status List: for the status claim of an SD-JWT
credential or of a JWT credential (CredentialStatus::SdJwt), fetches the status
list token from the referenced URI with an HttpClient, verifies it was signed by
the key its header names (KeyReference::from_jws with the token’s iss), resolved
for KeyRole::Issuer, and reads the status at the referenced index (Token Status
List §8).
When the token has an iss, the key must belong to it (KeyReference::binds_to);
without one, only a key named by a DID URL is accepted, since a key by value or a key
set could be anybody’s. Beyond that the check trusts the key the reference resolves
to; whether that key may speak for the list is the application’s policy to enforce
around it, by restricting the resolver, say.
The status list URI comes from the credential, so the client fetches whatever an issuer
names: client must enforce the protections ReqwestClient (feature reqwest) does
(HTTPS only, no redirects, no non-public addresses after name resolution, a body limit
and a timeout), or the status check becomes a request forgery primitive.
Implementations§
Source§impl<C: HttpClient, R: KeyResolver, V: JwsVerifier> StatusListCheck<C, R, V>
impl<C: HttpClient, R: KeyResolver, V: JwsVerifier> StatusListCheck<C, R, V>
Trait Implementations§
Source§impl<C: HttpClient, R: KeyResolver, V: JwsVerifier> StatusCheck for StatusListCheck<C, R, V>
impl<C: HttpClient, R: KeyResolver, V: JwsVerifier> StatusCheck for StatusListCheck<C, R, V>
Source§fn check<'life0, 'life1, 'async_trait>(
&'life0 self,
status: CredentialStatus<'life1>,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), StatusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
Available on crate feature vc only.
fn check<'life0, 'life1, 'async_trait>(
&'life0 self,
status: CredentialStatus<'life1>,
now: DateTime<Utc>,
) -> Pin<Box<dyn Future<Output = Result<(), StatusError>> + Send + 'async_trait>>where
Self: 'async_trait,
'life0: 'async_trait,
'life1: 'async_trait,
vc only.Checks the Token Status List reference of a status claim; a credentialStatus
entry, or a status claim without one, is StatusError::Unsupported.