Class: JwtDomainLinkageValidator
identity_wasm.JwtDomainLinkageValidator
A validator for a Domain Linkage Configuration and Credentials.
Table of contents
Constructors
Methods
Constructors
constructor
• new JwtDomainLinkageValidator(signatureVerifier?
)
Creates a new JwtDomainLinkageValidator. If a signatureVerifier
is provided it will be used when
verifying decoded JWS signatures, otherwise a default verifier capable of handling the EdDSA
, ES256
, ES256K
algorithms will be used.
Parameters
Name | Type |
---|---|
signatureVerifier? | IJwsVerifier |
Methods
validateLinkage
▸ validateLinkage(issuer
, configuration
, domain
, options
): void
Validates the linkage between a domain and a DID. DomainLinkageConfiguration is validated according to DID Configuration Resource Verification.
Linkage is valid if no error is thrown.
Note:
- Only the JSON Web Token Proof Format is supported.
- Only the Credential issued by
issuer
is verified.
Errors
- Semantic structure of
configuration
is invalid. configuration
includes multiple credentials issued byissuer
.- Validation of the matched Domain Linkage Credential fails.
Parameters
Name | Type |
---|---|
issuer | IToCoreDocument | CoreDocument |
configuration | DomainLinkageConfiguration |
domain | string |
options | JwtCredentialValidationOptions |
Returns
void
validateCredential
▸ validateCredential(issuer
, credentialJwt
, domain
, options
): void
Validates a Domain Linkage Credential.
Error will be thrown in case the validation fails.
Parameters
Name | Type |
---|---|
issuer | IToCoreDocument | CoreDocument |
credentialJwt | Jwt |
domain | string |
options | JwtCredentialValidationOptions |
Returns
void