DeviceListableSessionBackend
DeviceListableSessionBackend
Optional capability for a Hazaar\Auth\Interface\SessionBackend whose refresh tokens are backed by a
interface DeviceListableSessionBackendHazaar\Auth\Interface\DeviceAwareRefreshTokenStore and can therefore be listed/revoked per device.
Deliberately not part of the base Hazaar\Auth\Interface\SessionBackend contract, mirroring Hazaar\Auth\Interface\RevocableSessionBackend: a backend like PHPSession or Cache has no device-indexed storage to list. Hazaar\Auth\Adapter::listDevices and Hazaar\Auth\Adapter::revokeDevice check for this interface and no-op when the configured backend doesn't support it.
Methods
listDevices
Lists every outstanding device/session for an identity.
public listDevices(string $identity): arrayReturns: array
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string |
revokeDevice
Revokes a single device/session outright (e.g. "log out this device").
public revokeDevice(string $identity, string $sessionId): voidReturns: void
A no-op if the session is unknown or already revoked/consumed.
Parameters
| Parameter | Type | Description |
|---|---|---|
$identity | string | |
$sessionId | string |
Generated by Hazaar API Doc Generator on Sun, 23 Aug 2026 10:49:44 +0000