DefaultDidDocumentVerificationService

Default implementation of document verification service.

Constructors

Link copied to clipboard
constructor(canonicalizationService: DidDocumentCanonicalizationService)

Functions

Link copied to clipboard

Same check as verifyDocumentSignature, but reported honestly: the returned VerificationResult states that at most a self-certification was established and that no signature was verified (VerificationResult.integrityVerified is always false).

Link copied to clipboard
open suspend override fun verifyDocument(document: DidDocument, resolutionMetadata: DidResolutionMetadata): VerificationResult

Verify DID document integrity and authenticity.

open suspend override fun verifyDocument(document: DidDocument, resolutionMetadata: DidResolutionMetadata, expectedDid: String?): VerificationResult

Like verifyDocument, and additionally checks that the document is the one for expectedDid: document.id must equal it exactly. A resolver that returns another subject's document for the requested DID must not pass verification.

Link copied to clipboard
open suspend override fun verifyDocumentSignature(document: DidDocument, method: String): Boolean

Verify document signature (if method supports it).

Link copied to clipboard
open suspend override fun verifyVerificationMethod(method: VerificationMethod, signature: String, data: ByteArray): Boolean

Verifies signature over data with the key of method.