ALL

Solo para leer y verificar. No puedes copiar, usar, modificar ni redistribuir este código. Aviso completo en la página principal.

contracts/schemas/session-claims.schema.json

SHA-256: 2d85a806b2fd98ade32c6076336b8a5cdc6ec097abb5e25b977e52296a59b509
24 líneas · 1355 bytes · Ver en GitHub

1{
2 "$schema": "https://json-schema.org/draft/2020-12/schema",
3 "$id": "https://all-mcp.fyi/contracts/v2/session-claims.schema.json",
4 "title": "Claims of a device session (typ device-session) as the control plane device-security module issues them (ver 2, 300 s). The tunnel node accepts only aud all-tunnel; the lifetime check exp - iat == policy.authorization.session_ttl_s is done in code. Unknown extra claims are ignored (a token is not a closed shape), the listed ones are not optional unless the schema says so.",
5 "type": "object",
6 "required": ["typ", "ver", "iss", "aud", "sub", "iat", "exp", "jti", "generation", "cnf"],
7 "properties": {
8 "typ": {"const": "device-session"},
9 "ver": {"const": 2},
10 "iss": {"const": "https://api.all-mcp.fyi"},
11 "aud": {"type": "string", "enum": ["all-control", "all-relay", "all-tunnel"]},
12 "sub": {"$ref": "common.schema.json#/$defs/device_id"},
13 "iat": {"$ref": "common.schema.json#/$defs/epoch_s"},
14 "exp": {"$ref": "common.schema.json#/$defs/epoch_s"},
15 "jti": {"$ref": "common.schema.json#/$defs/jti"},
16 "generation": {"type": "integer", "minimum": 1, "maximum": 9007199254740991},
17 "cnf": {
18 "type": "object",
19 "required": ["jwk"],
20 "additionalProperties": false,
21 "properties": {"jwk": {"$ref": "common.schema.json#/$defs/public_jwk"}}
22 }
23 }
24}