跳转到内容

Revoke the session behind a refresh token.

POST
/logout
curl --request POST \
--url https://session-api.sudomimus.com/logout \
--header 'Content-Type: application/json' \
--data '{ "refreshToken": "example" }'

Revokes the single session identified by the supplied refresh token. Any genuine signed version whose sid, aud, jti, and rotationVersion bind to that session may authorize the revocation; accepting an older genuine version here does not make it refreshable. No client-auth JWT is required. The operation is idempotent.

Media typeapplication/json
object
refreshToken
required

Any genuine signed refresh-token version for the session to revoke.

string
Examplegenerated
{
"refreshToken": "example"
}

Revocation outcome.

Media typeapplication/json
object
revoked
required
boolean
Examplegenerated
{
"revoked": true
}

Error response.

Media typeapplication/json

Error response body. A missing, malformed, or structurally invalid JSON request body returns InvalidBody. Documented status-only failures have an empty response body.

object
reason
required
string
message
string
Examplegenerated
{
"reason": "example",
"message": "example"
}