Skip to content

Create a DID authentication challenge.

POST
/api/auth/dids/challenge
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/auth/dids/challenge \
--header 'Content-Type: application/json' \
--data '{ "did": "did:web:example.com" }'
Media type application/json
object
did
required
string
nonce
string
Example
{
"did": "did:web:example.com"
}

Successful JSON response.

Media type application/json
object
challenge_id
required
string
challenge
required
string
nonce
required
string
allowed_verification_methods
required
Array<object>
object
id
string
type
string
controller
string
publicKeyJwk
object
key
additional properties
expires_in
required
integer
Example
{
"challenge_id": "challenge_123",
"challenge": "Sign this challenge",
"nonce": "nonce_123",
"allowed_verification_methods": [
{
"id": "did:web:example.com#key-1",
"type": "JsonWebKey2020",
"controller": "did:web:example.com",
"publicKeyJwk": {
"kty": "OKP",
"crv": "Ed25519",
"x": "..."
}
}
],
"expires_in": 300
}