Class: JptCredentialValidatorUtils
identity_wasm.JptCredentialValidatorUtils
Utility functions for validating JPT credentials.
Table of contents
Constructors
Methods
- extractIssuer
- extractIssuerFromIssuedJpt
- checkTimeframesWithValidityTimeframe2024
- checkRevocationWithValidityTimeframe2024
- checkTimeframesAndRevocationWithValidityTimeframe2024
Constructors
constructor
• new JptCredentialValidatorUtils()
Methods
extractIssuer
▸ Static extractIssuer(credential): CoreDID
Utility for extracting the issuer field of a Credential as a DID.
Errors
Fails if the issuer field is not a valid DID.
Parameters
| Name | Type |
|---|---|
credential | Credential |
Returns
extractIssuerFromIssuedJpt
▸ Static extractIssuerFromIssuedJpt(credential): CoreDID
Utility for extracting the issuer field of a credential in JPT representation as DID.
Errors
If the JPT decoding fails or the issuer field is not a valid DID.
Parameters
| Name | Type |
|---|---|
credential | Jpt |
Returns
checkTimeframesWithValidityTimeframe2024
▸ Static checkTimeframesWithValidityTimeframe2024(credential, validity_timeframe, status_check): void
Parameters
| Name | Type |
|---|---|
credential | Credential |
validity_timeframe | undefined | Timestamp |
status_check | StatusCheck |
Returns
void
checkRevocationWithValidityTimeframe2024
▸ Static checkRevocationWithValidityTimeframe2024(credential, issuer, status_check): void
Checks whether the credential status has been revoked.
Only supports RevocationTimeframe2024.
Parameters
| Name | Type |
|---|---|
credential | Credential |
issuer | IToCoreDocument | CoreDocument |
status_check | StatusCheck |
Returns
void
checkTimeframesAndRevocationWithValidityTimeframe2024
▸ Static checkTimeframesAndRevocationWithValidityTimeframe2024(credential, issuer, validity_timeframe, status_check): void
Checks whether the credential status has been revoked or the timeframe interval is INVALID
Only supports RevocationTimeframe2024.
Parameters
| Name | Type |
|---|---|
credential | Credential |
issuer | IToCoreDocument | CoreDocument |
validity_timeframe | undefined | Timestamp |
status_check | StatusCheck |
Returns
void