Resuelve un access token de identity a su principal (actor, rol, sesión) teniendo en cuenta la revocación.
packages/api-contracts/src/bus/nats.tsPágina generada desde
packages/api-contracts/src/bus/nats.ts + packages/api-contracts/src/bus/routes.ts. No se edita a mano:bun run docs:genla regenera ybun run docs:checkfalla si difiere.
qry.identity.session · v2
Resuelve un access token de identity a su principal (actor, rol, sesión) teniendo en cuenta la
revocación: lo pide el resolver del macro auth de cada servicio, sólo tras verificar en local
la firma del token (TS2-P2-01).
| Campo | Valor |
|---|---|
| Familia | qry |
| Versión | 2 |
| Tope del payload | 16384 bytes |
| Contrato | IdentitySession en packages/api-contracts/src/bus/nats.ts |
BUS_ROUTES)Deny-by-default: un emisor fuera de la allowlist se deniega y se audita (dec-0119 §4).
| Atiende | Transporte | Emisores admitidos | Rate (por emisor) |
|---|---|---|---|
identity-svc | nats | catalog-svc, playback-svc, realtime-svc, styx-ops | 300/s, ráfaga 600 |
{
"type": "object",
"required": [
"accessToken"
],
"properties": {
"accessToken": {
"type": "string",
"minLength": 1
}
}
}{
"anyOf": [
{
"type": "object",
"required": [
"ok",
"data"
],
"properties": {
"ok": {
"type": "boolean",
"const": true
},
"data": {
"type": "object",
"required": [
"actorId",
"sessionId",
"role",
"authTime",
"expiresAt"
],
"properties": {
"actorId": {
"type": "string"
},
"sessionId": {
"type": "string"
},
"role": {
"anyOf": [
{
"type": "string",
"const": "restricted"
},
{
"type": "string",
"const": "member"
},
{
"type": "string",
"const": "admin"
},
{
"type": "string",
"const": "owner"
}
]
},
"authTime": {
"type": "integer"
},
"expiresAt": {
"type": "integer"
},
"displayName": {
"type": "string"
},
"cred": {
"anyOf": [
{
"type": "string",
"const": "browser"
},
{
"type": "string",
"const": "device"
},
{
"type": "string",
"const": "pat"
}
]
},
"scopes": {
"type": "array",
"items": {
"type": "string",
"minLength": 3,
"maxLength": 64
},
"maxItems": 64
}
}
}
}
},
{
"type": "object",
"required": [
"ok",
"error"
],
"properties": {
"ok": {
"type": "boolean",
"const": false
},
"error": {
"type": "object",
"required": [
"code",
"message",
"category",
"retryable"
],
"properties": {
"code": {
"type": "string"
},
"message": {
"type": "string"
},
"category": {
"anyOf": [
{
"type": "string",
"const": "transient"
},
{
"type": "string",
"const": "permanent"
},
{
"type": "string",
"const": "recoverable"
}
]
},
"retryable": {
"type": "boolean"
},
"suggestedAction": {
"type": "string"
},
"details": {
"anyOf": [
{
"type": "object",
"properties": {}
},
{
"type": "array",
"items": {}
}
]
},
"causedBy": {
"type": "array",
"items": {
"anyOf": [
{
"type": "object",
"properties": {}
},
{
"type": "array",
"items": {}
}
]
}
}
}
}
}
}
]
}