DefaultDidDocumentVerificationService
class DefaultDidDocumentVerificationService(canonicalizationService: DidDocumentCanonicalizationService) : DidDocumentVerificationService
Default implementation of document verification service.
Functions
Link copied to clipboard
open suspend fun checkDocumentSelfCertification(document: DidDocument, method: String): VerificationResult
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
Verify document signature (if method supports it).
Link copied to clipboard
open suspend override fun verifyVerificationMethod(method: VerificationMethod, signature: String, data: ByteArray): Boolean