コンテンツにスキップ

Create a DID registration challenge for the current session.

POST
/api/auth/dids/register/challenge
Code sample: Shell / cURL
curl --request POST \
--url https://auth.example.com/api/auth/dids/register/challenge \
--header 'Content-Type: application/json' \
--cookie authrim_session=<authrim_session> \
--data '{ "did": "did:web:example.com" }'

Creates a DID proof challenge for an authenticated browser session so the DID can be linked to the current user.

Media type application/json
object
did
required
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
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}

Error response.

Media type application/json
object
error
string
error_description
string
message
string
webauthn_signal

Optional browser-side WebAuthn Signal API hint. When unknown_credential is true, clients that just received a WebAuthn credential assertion may call PublicKeyCredential.signalUnknownCredential() for that credential ID.

object
unknown_credential
boolean
key
additional properties
Example generated
{
"error": "example",
"error_description": "example",
"message": "example",
"webauthn_signal": {
"unknown_credential": true
}
}