GET /auth/sessions
Retorna as sessões ativas (refresh tokens não revogados/expirados) do caller, marcando qual é a corrente.
- Access: Public
- Service:
https://auth-api.axuz.net
Accepted authentication
No authentication (public route, or protected by link/signature).
Retorna as sessões ativas (refresh tokens não revogados/expirados) do caller, marcando qual é a corrente.
Motivo: telinha "sessões ativas" nas configurações do user (workspace + admin) precisa listar dispositivos/UA/IPs pra que o dono da conta consiga revogar sessão suspeita. Marcar a corrente evita o user derrubar a própria aba por engano. Comportamento: (1) resolveCallerSession extrai uid + família do sid do access + hash do refresh; 401 opaco se falhar; (2) ListSessions marca current pela família OU pelo hash; (3) 200 {items: [...]}; erro DB = 500 opaco (detalhe no log).
Entradas: cookie access_token (+ refresh_token opcional).
Retorno: 200 {items:[{id, user_agent, ip, last_seen_at, current}]}; 401/500 em falha.
Parameters
No parameters.
Responses
200
{items:[{id, user_agent, ip, last_seen_at, current}]}
401
Sem credencial valida
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
429
Limite de requisições excedido.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
500
Erro interno. Tente de novo com backoff; reporte o X-Request-Id.
| Name | Type | Required | Description |
|---|---|---|---|
error | string | yes |
Examples
"Try it" is turned off in this reference. Use the examples with your test credential.
curl
curl -sS -X GET 'https://auth-api.axuz.net/auth/sessions'Node.js
const res = await fetch("https://auth-api.axuz.net/auth/sessions", {
method: 'GET',
});
if (!res.ok) throw new Error(`HTTP ${res.status}: ${await res.text()}`);
console.log(await res.json());Python
import os
import requests
res = requests.request(
"GET",
"https://auth-api.axuz.net/auth/sessions",
timeout=30,
)
res.raise_for_status()
print(res.json())