POST /api/auth/login HTTP/1.1
Content-Type: application/json
{
"did": "did:alyra:z6Mkf...",
"challenge": "nonce-from-challenge-endpoint",
"signature": "base64EncodedEd25519Signature"
}
Body
| Field | Type | Required | Description |
|---|---|---|---|
did | string | Yes | DID being authenticated. |
challenge | string | Yes | Challenge returned by POST /api/auth/challenge. |
signature | string | Yes | Signature over the challenge using the DID key. |
Response
200 OK
{
"success": true,
"message": "Login successful",
"user": {
"did": "did:alyra:z6Mkf...",
"public_key": "base64-or-multibase-public-key",
"name": "Alice",
"email": "alice@example.com"
},
"token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9..."
}
Authorization: Bearer <token> for subsequent calls.