Cookie de navegador → principal + access token del BFF (dec-0118 §2.1).
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.browserSession · v2
Cookie de navegador → principal + access token del BFF (dec-0118 §2.1). Revocation-aware y con la rotación periódica de la credencial.
| Campo | Valor |
|---|---|
| Familia | qry |
| Versión | 2 |
| Tope del payload | 16384 bytes |
| Contrato | IdentityBrowserSession 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 | web, styx-ops | 300/s, ráfaga 600 |
{
"type": "object",
"required": [
"credential"
],
"properties": {
"credential": {
"type": "string",
"minLength": 1,
"maxLength": 256
},
"clientIp": {
"type": "string",
"minLength": 1,
"maxLength": 64
}
}
}{
"anyOf": [
{
"type": "object",
"required": [
"ok",
"data"
],
"properties": {
"ok": {
"type": "boolean",
"const": true
},
"data": {
"type": "object",
"required": [
"principal",
"accessToken",
"csrfToken"
],
"properties": {
"principal": {
"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
}
}
},
"accessToken": {
"type": "string"
},
"csrfToken": {
"type": "string"
},
"rotated": {
"type": "object",
"required": [
"credential",
"maxAgeS"
],
"properties": {
"credential": {
"type": "string",
"maxLength": 256
},
"maxAgeS": {
"type": "integer",
"minimum": 0
}
}
}
}
}
}
},
{
"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": {}
}
]
}
}
}
}
}
}
]
}