MngRevokeSessionsByOwner¶
Description: Revokes every session owned by one principal. The operation is idempotent for a valid owner with no active sessions. This method requires a specific owner; use MngRevokeSession for one session.
Access Control¶
🛡️ Access Level Required: An ordinary staff session or manager API token over TCP may revoke sessions belonging to the same manager identity. A super admin may revoke sessions for any owner. An explicit API command scope must include
MngRevokeSessionsByOwner.
Request Parameters¶
| Name | Type | Required | Description |
|---|---|---|---|
owner_type |
int | Yes | Owner type: 0 account, 1 manager, 2 dealer, 3 admin, 9 customer, 10 CRM manager, 11 CRM admin, or 12 affiliate. |
owner_id |
int | Yes | Positive owner ID. This command does not accept the all-owner selector. |
reason |
string | No | Revocation reason, up to 255 bytes. Default: administrator_revoked. |
A staff session can target its own staff identity across staff role types. For owner types 1 (manager), 2 (dealer), 3 (admin), 10 (CRM manager), and 11 (CRM admin), the same owner_id identifies the same staff member; the method revokes all sessions for that manager across those role types. Other targets require a super-admin session.
Request Example¶
{
"command": "MngRevokeSessionsByOwner",
"extID": "request-1",
"__token": "<compact Ed25519 session JWT>",
"data": {
"owner_type": 1,
"owner_id": 1001,
"reason": "manager_access_changed"
}
}
Response Example¶
{ "revoked": true }
A successful response means the cache revocation and ordered persistence operation were accepted. It takes effect immediately for subsequent platform authorization checks; the response is not a SQLite commit acknowledgement.
Errors¶
| Status | Error | Description |
|---|---|---|
| 400 | INVALID_DATA |
Missing owner field, unsupported type, non-positive ID, or invalid reason. |
| 403 | PERMISSION_DENIED |
Caller cannot manage the requested owner, or the explicit API command scope does not include MngRevokeSessionsByOwner. |
| 503 | SESSION_GUARD_UNAVAILABLE |
SessionGuard is unavailable or could not accept the revocations into its persistence queue. A 503 does not report a synchronous SQLite commit failure. |