From a8e0526d59b673408f4f193c595bddd3d77ff067 Mon Sep 17 00:00:00 2001 From: Yarmo Mackenbach Date: Thu, 7 Jan 2021 16:22:24 +0100 Subject: [PATCH] Add signature verification API documentation --- docs/api.md | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/docs/api.md b/docs/api.md index 10b2958..4ce7340 100644 --- a/docs/api.md +++ b/docs/api.md @@ -187,3 +187,31 @@ Parses the `keyPlaintext`. **Returns** A public key object. + +## signatures.verify(uri, [fingerprint], [opts]) + +_(async)_ doip.signatures.verify(signature, [opts]) + +Verifies the identity behind the claims in the provided clear-signed **signature**. + +**Parameters** + +| Name | Type | Mandatory | Description | +| --------- | ------ | --------- | ------------------------- | +| signature | string | true | the clear-sgned signature | +| opts | object | false | options (see below) | + +**Options** + +See [claims.verify(uri, ...)](#claimsverifyuri-fingerprint-opts). + +**Returns** + +```json +{ + "errors": [ ... ], + "publicKey": { ... }, + "fingerprint": "...", + "serviceproviderData": { ... } +} +```