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
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
issuer
IToCoreDocument
| CoreDocument
configuration
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
domain
string
options
JwtCredentialValidationOptions
Returns
void