Skip to content

Sign a digest with the authenticated user's DID key

POST
/api/v1/protected/sign
curl --request POST \
--url https://localhost:8080/api/v1/protected/sign \
--header 'Authorization: <Authorization>' \
--header 'Content-Type: application/json' \
--data '{ "dataHash": "b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9" }'

Sign a 32-byte SHA-256 digest (hex-encoded) using the authenticated user’s DID key in the configured key provider

Hex encoded data hash to sign

Media type application/json
object
dataHash
required
string
Example
b94d27b9934d3e08a52e52d7da7dabfac484efe37a5380ee9088f7ace2efcde9

Signature created successfully

Media type application/json
object
signature
string
Example
{
"signature": "3045022100a1b2c3d4e5f6..."
}

Bad request - Invalid data

Media type application/json
object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Unauthorized

Media type application/json
object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

No DID key found for user

Media type application/json
object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}

Internal server error

Media type application/json
object
error
string
error_description
string
Example
{
"error": "Unauthorized",
"error_description": "Invalid token"
}