Skip to main content
Version: 1.3

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

NameType
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:

Errors

  • Semantic structure of configuration is invalid.
  • configuration includes multiple credentials issued by issuer.
  • Validation of the matched Domain Linkage Credential fails.

Parameters

NameType
issuerIToCoreDocument | CoreDocument
configurationDomainLinkageConfiguration
domainstring
optionsJwtCredentialValidationOptions

Returns

void


validateCredential

validateCredential(issuer, credentialJwt, domain, options): void

Validates a Domain Linkage Credential.

Error will be thrown in case the validation fails.

Parameters

NameType
issuerIToCoreDocument | CoreDocument
credentialJwtJwt
domainstring
optionsJwtCredentialValidationOptions

Returns

void