Skip to main content
info
IOTA Identity for Rebased is currently in alpha and may still be subject to significant changes

JwtDomainLinkageValidator

@iota/identity-wasm API documentation


Class: JwtDomainLinkageValidator

A validator for a Domain Linkage Configuration and Credentials.

Constructors

new JwtDomainLinkageValidator()

new JwtDomainLinkageValidator(signatureVerifier?): JwtDomainLinkageValidator

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

signatureVerifier?

null | IJwsVerifier

Returns

JwtDomainLinkageValidator

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

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

issuer

IToCoreDocument | CoreDocument

credentialJwt

Jwt

domain

string

options

JwtCredentialValidationOptions

Returns

void