Upload 5 files
Browse filesInitial upload v<version>
Files changed (5)
- README.mdAdded+84
- jwt-claims-reference.jsonAdded+550
- jwt-claims-reference.schema.jsonAdded+132
- records-registered_claims.jsonlAdded+7
- records-token_fixtures.jsonlAdded+8
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384---license: cc0-1.0pretty_name: "JWT Claims Reference and Signed Test Tokens"language:- ensize_categories:- n<1Ktags:- jwt- oidc- oauth2- authentication- test-vectors- json- json-schemaconfigs:- config_name: registered_claims data_files: records-registered_claims.jsonl default: true- config_name: token_fixtures data_files: records-token_fixtures.jsonl---# JWT Claims Reference and Signed Test Tokens
The 7 RFC 7519 registered claims with requirement levels for plain JWTs, OIDC ID tokens and RFC 9068 access tokens, plus 8 signed test tokens: 2 valid and 6 that verification code must reject, each with the error to expect.
Unit tests for JWT verification code: check that valid tokens pass and each broken token fails for the right reason.
**Full guide and live preview: [www.aptdot.com/datasets/jwt-claims-reference/](https://www.aptdot.com/datasets/jwt-claims-reference/)**
| | || :--- | :--- || Version | 1.0.0 (2026-10-20) || License | CC0 1.0 (public domain) || JSON Schema | [`jwt-claims-reference.schema.json`](https://www.aptdot.com/data/v1/jwt-claims-reference.schema.json) (Draft 2020-12) || Source repository | [github.com/mkchd25/aptdot-datasets](https://github.com/mkchd25/aptdot-datasets) || Publisher | [Aptdot](https://www.aptdot.com) |
## Files
| File | What it is || :--- | :--- || `jwt-claims-reference.json` | The complete dataset, identical to the file on aptdot.com and GitHub || `jwt-claims-reference.schema.json` | Its JSON Schema (Draft 2020-12) || `records-*.jsonl` | The main lists, one record per line, for the viewer and the `datasets` library |
## Tables
| Table | Rows | File | Fields || :--- | ---: | :--- | :--- || `registered_claims` | 7 | `records-registered_claims.jsonl` | `claim`, `name`, `type`, `rfc_spec`, `required_in`, `description`, `security_considerations` || `token_fixtures` | 8 | `records-token_fixtures.jsonl` | `name`, `fixture_id`, `description`, `intended_outcome`, `expected_error`, `verification`, `header`, `payload`, ... |
## Load it
```pythonfrom datasets import load_dataset
rows = load_dataset("aptdot/jwt-claims-reference", "registered_claims", split="train")```
Or use the complete JSON file as it is:
```pythonimport jsonfrom huggingface_hub import hf_hub_download
path = hf_hub_download("aptdot/jwt-claims-reference", "jwt-claims-reference.json", repo_type="dataset")data = json.load(open(path, encoding="utf-8"))```
## Check your own data against the schema
Paste your records and `jwt-claims-reference.schema.json` into the free [JSON Schema Validator](https://www.aptdot.com/tools/json-schema-validator/). It runs in yourbrowser, uploads nothing and explains every problem in plain English with its line number.
## Notes
- The `records-*.jsonl` files are generated from `jwt-claims-reference.json`. If they ever disagree, `jwt-claims-reference.json` is the reference.- Versions match aptdot.com and GitHub. Changes are listed in the repository's [CHANGELOG](https://github.com/mkchd25/aptdot-datasets/blob/main/CHANGELOG.md).
## License
CC0 1.0 Universal: public domain. You can copy, change and use it for any purpose, including commercial use, without asking.123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550{ "$schema": "https://www.aptdot.com/data/v1/jwt-claims-reference.schema.json", "metadata": { "name": "JWT Claims Reference & Signed Test Token Fixtures", "version": "1.0.0", "date_modified": "2026-10-20", "license": "CC0-1.0", "license_url": "https://creativecommons.org/publicdomain/zero/1.0/", "schema": "https://www.aptdot.com/data/v1/jwt-claims-reference.schema.json", "source": "https://www.aptdot.com/datasets/jwt-claims-reference/", "reference_time": "2026-10-20T10:00:00Z", "reference_time_epoch": 1792490400, "specifications": { "jwt": "https://www.rfc-editor.org/rfc/rfc7519", "jwt_access_token_profile": "https://www.rfc-editor.org/rfc/rfc9068", "oidc_core": "https://openid.net/specs/openid-connect-core-1_0.html", "amr_values": "https://www.rfc-editor.org/rfc/rfc8176" }, "test_signing_key": { "kid": "aptdot-test-hs256-01", "alg": "HS256", "secret": "aptdot-public-test-key-NEVER-use-in-production-2026", "warning": "Public test-only key. Every token in this file is signed with it (except the bad-signature and alg-none vectors). Never use it, or tokens signed with it, outside tests." }, "related_datasets": [ "https://www.aptdot.com/datasets/synthetic-rbac-users/" ], "persona_note": "sub, email, org_id, workspace_roles and scope match user usr_002 (sarah.lead@example.com) in the Synthetic RBAC dataset.", "total_registered_claims": 7, "total_token_fixtures": 8, "description": "RFC 7519 registered claims with per-profile requirement levels (base JWT, OIDC ID token, RFC 9068 access token), plus signed, ready-to-verify valid tokens and 6 negative test vectors with the exact error each major JWT library raises." }, "registered_claims_dictionary": [ { "claim": "iss", "name": "Issuer", "type": "StringOrURI", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.1", "required_in": { "rfc7519": "optional", "oidc_id_token": "required", "rfc9068_access_token": "required" }, "description": "Identifies the principal that issued the JWT, usually the authorization server's HTTPS issuer URL.", "security_considerations": "Compare with exact string equality against an allow-list of trusted issuers, and select verification keys per issuer, to block tokens from other identity providers." }, { "claim": "sub", "name": "Subject", "type": "StringOrURI", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2", "required_in": { "rfc7519": "optional", "oidc_id_token": "required", "rfc9068_access_token": "required" }, "description": "Identifies the principal the JWT is about, such as a user ID or service account ID.", "security_considerations": "Must be unique within the issuer. Key user records on iss + sub, never on email, because emails can change or be reassigned." }, { "claim": "aud", "name": "Audience", "type": "StringOrURI or array of StringOrURI", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3", "required_in": { "rfc7519": "optional", "oidc_id_token": "required", "rfc9068_access_token": "required" }, "description": "Identifies the recipients the JWT is intended for: an API identifier for access tokens, the client_id for ID tokens.", "security_considerations": "A resource server must reject tokens that do not list its own identifier in aud, to prevent token pass-through between APIs." }, { "claim": "exp", "name": "Expiration Time", "type": "NumericDate (seconds since Unix epoch)", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4", "required_in": { "rfc7519": "optional", "oidc_id_token": "required", "rfc9068_access_token": "required" }, "description": "The time on or after which the JWT must not be accepted for processing.", "security_considerations": "Keep access tokens short-lived (commonly 5 to 60 minutes). Allow only a small clock-skew leeway, typically 60 seconds or less." }, { "claim": "nbf", "name": "Not Before", "type": "NumericDate (seconds since Unix epoch)", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.5", "required_in": { "rfc7519": "optional", "oidc_id_token": "not_defined", "rfc9068_access_token": "optional" }, "description": "The time before which the JWT must not be accepted for processing.", "security_considerations": "Reject when current_time + leeway < nbf. Useful for scheduled or deferred activation." }, { "claim": "iat", "name": "Issued At", "type": "NumericDate (seconds since Unix epoch)", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.6", "required_in": { "rfc7519": "optional", "oidc_id_token": "required", "rfc9068_access_token": "required" }, "description": "The time at which the JWT was issued.", "security_considerations": "Lets a verifier compute token age and reject tokens issued before a password reset or session-revocation event." }, { "claim": "jti", "name": "JWT ID", "type": "string (case-sensitive, unique per token)", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7", "required_in": { "rfc7519": "optional", "oidc_id_token": "not_defined", "rfc9068_access_token": "required" }, "description": "A unique identifier for the token.", "security_considerations": "Enables replay detection and revocation: store seen or revoked jti values until the token's exp passes." } ], "token_fixtures": { "enterprise_access_token": { "fixture_id": "tok_access_valid_01", "description": "RFC 9068 OAuth 2.0 access token for a multi-tenant API: space-delimited scope, client_id, workspace roles and MFA evidence (amr). Valid at reference_time.", "intended_outcome": "valid", "expected_error": null, "verification": { "algorithms": [ "HS256" ], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": [ "iss", "sub", "aud", "exp", "iat", "jti", "client_id" ], "required_typ": "at+jwt" }, "header": { "alg": "HS256", "typ": "at+jwt", "kid": "aptdot-test-hs256-01" }, "payload": { "iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://api.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792490100, "nbf": 1792490100, "exp": 1792493700, "jti": "6f1c2a9e-3b7d-4e0f-9a8c-1d2e3f4a5b60", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792490080, "amr": [ "pwd", "otp", "mfa" ], "org_id": "org_enterprise_01", "workspace_roles": { "ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor" } }, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0OTAxMDAsIm5iZiI6MTc5MjQ5MDEwMCwiZXhwIjoxNzkyNDkzNzAwLCJqdGkiOiI2ZjFjMmE5ZS0zYjdkLTRlMGYtOWE4Yy0xZDJlM2Y0YTViNjAiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDkwMDgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0.9vfl5EINUfLQvs3kO3LJv6ByGFOSPIpeWNmoAuXMGuA" }, "oidc_id_token": { "fixture_id": "tok_id_valid_02", "description": "OpenID Connect ID token for the same user, issued to the web client (aud = client_id), with nonce and auth_time. Valid at reference_time.", "intended_outcome": "valid", "expected_error": null, "verification": { "algorithms": [ "HS256" ], "issuer": "https://auth.example.com/", "audience": "client_web_app_991823", "required_claims": [ "iss", "sub", "aud", "exp", "iat" ] }, "header": { "alg": "HS256", "typ": "JWT", "kid": "aptdot-test-hs256-01" }, "payload": { "iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "client_web_app_991823", "iat": 1792490100, "exp": 1792493700, "auth_time": 1792490080, "nonce": "n-0S6_WzA2Mj", "email": "sarah.lead@example.com", "email_verified": true, "name": "Sarah Lead", "amr": [ "pwd", "otp", "mfa" ] }, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiSldUIn0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiY2xpZW50X3dlYl9hcHBfOTkxODIzIiwiaWF0IjoxNzkyNDkwMTAwLCJleHAiOjE3OTI0OTM3MDAsImF1dGhfdGltZSI6MTc5MjQ5MDA4MCwibm9uY2UiOiJuLTBTNl9XekEyTWoiLCJlbWFpbCI6InNhcmFoLmxlYWRAZXhhbXBsZS5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwibmFtZSI6IlNhcmFoIExlYWQiLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl19.NS02x3zPhI338zN-m6L-DKP9p3rbZpo3xh767OXaw9I" }, "test_vector_expired": { "fixture_id": "tok_test_expired_03", "description": "Access token whose exp is 2 hours before reference_time. Must be rejected as expired.", "intended_outcome": "invalid_expired", "expected_error": { "pyjwt": "ExpiredSignatureError", "jsonwebtoken": "TokenExpiredError", "jsonwebtoken_message": "jwt expired" }, "verification": { "algorithms": [ "HS256" ], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": [ "iss", "sub", "aud", "exp", "iat", "jti", "client_id" ], "required_typ": "at+jwt" }, "header": { "alg": "HS256", "typ": "at+jwt", "kid": "aptdot-test-hs256-01" }, "payload": { "iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://api.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792479600, "nbf": 1792479600, "exp": 1792483200, "jti": "0a7e4c1b-5d2f-4a9e-8b3c-7f6e5d4c3b21", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792479580, "amr": [ "pwd", "otp", "mfa" ], "org_id": "org_enterprise_01", "workspace_roles": { "ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor" } }, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0Nzk2MDAsIm5iZiI6MTc5MjQ3OTYwMCwiZXhwIjoxNzkyNDgzMjAwLCJqdGkiOiIwYTdlNGMxYi01ZDJmLTRhOWUtOGIzYy03ZjZlNWQ0YzNiMjEiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDc5NTgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0.4r0RPI39n0glHgJyrbsqqMskGNSQtzX8Y0tJK35w0wA" }, "test_vector_nbf_future": { "fixture_id": "tok_test_premature_04", "description": "Access token with nbf 2 hours after reference_time (scheduled activation). Must be rejected as not yet valid.", "intended_outcome": "invalid_premature", "expected_error": { "pyjwt": "ImmatureSignatureError", "jsonwebtoken": "NotBeforeError", "jsonwebtoken_message": "jwt not active" }, "verification": { "algorithms": [ "HS256" ], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": [ "iss", "sub", "aud", "exp", "iat", "jti", "client_id" ], "required_typ": "at+jwt" }, "header": { "alg": "HS256", "typ": "at+jwt", "kid": "aptdot-test-hs256-01" }, "payload": { "iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://api.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792490100, "nbf": 1792497600, "exp": 1792501200, "jti": "1b8f5d2c-6e3a-4b0f-9c4d-8a7f6e5d4c32", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792490080, "amr": [ "pwd", "otp", "mfa" ], "org_id": "org_enterprise_01", "workspace_roles": { "ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor" } }, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0OTAxMDAsIm5iZiI6MTc5MjQ5NzYwMCwiZXhwIjoxNzkyNTAxMjAwLCJqdGkiOiIxYjhmNWQyYy02ZTNhLTRiMGYtOWM0ZC04YTdmNmU1ZDRjMzIiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDkwMDgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0.dAddr7k4423BVnUrsTns5aZD3hFVY_tD4C042hAOZ7I" }, "test_vector_missing_iss": { "fixture_id": "tok_test_missing_iss_05", "description": "Access token with no iss claim. Must be rejected when the verifier requires a trusted issuer.", "intended_outcome": "invalid_missing_claim", "expected_error": { "pyjwt": "MissingRequiredClaimError", "jsonwebtoken": "JsonWebTokenError", "jsonwebtoken_message": "jwt issuer invalid. expected: https://auth.example.com/" }, "verification": { "algorithms": [ "HS256" ], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": [ "iss", "sub", "aud", "exp", "iat", "jti", "client_id" ], "required_typ": "at+jwt" }, "header": { "alg": "HS256", "typ": "at+jwt", "kid": "aptdot-test-hs256-01" }, "payload": { "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://api.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792490100, "nbf": 1792490100, "exp": 1792493700, "jti": "2c9a6e3d-7f4b-4c1a-8d5e-9b8a7f6e5d43", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792490080, "amr": [ "pwd", "otp", "mfa" ], "org_id": "org_enterprise_01", "workspace_roles": { "ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor" } }, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJzdWIiOiI4YjRhNWYzYy05ZDJlLTRiMGEtOGY3Yy02ZDFlM2E4ZjBiMDIiLCJhdWQiOiJodHRwczovL2FwaS5leGFtcGxlLmNvbS92MSIsImNsaWVudF9pZCI6ImNsaWVudF93ZWJfYXBwXzk5MTgyMyIsImlhdCI6MTc5MjQ5MDEwMCwibmJmIjoxNzkyNDkwMTAwLCJleHAiOjE3OTI0OTM3MDAsImp0aSI6IjJjOWE2ZTNkLTdmNGItNGMxYS04ZDVlLTliOGE3ZjZlNWQ0MyIsInNjb3BlIjoiZGF0YTpyZWNvcmRzOnJlYWQgZGF0YTpyZWNvcmRzOndyaXRlIGRhdGE6cmVjb3JkczpleHBvcnQgd29ya3NwYWNlOnNldHRpbmdzOnJlYWQgdGVhbTptZW1iZXJzOnJlYWQiLCJhdXRoX3RpbWUiOjE3OTI0OTAwODAsImFtciI6WyJwd2QiLCJvdHAiLCJtZmEiXSwib3JnX2lkIjoib3JnX2VudGVycHJpc2VfMDEiLCJ3b3Jrc3BhY2Vfcm9sZXMiOnsid3NfcHJvZF9ldSI6IndvcmtzcGFjZV9lZGl0b3IiLCJ3c19zdGFnaW5nIjoid29ya3NwYWNlX2VkaXRvciJ9fQ.K1kI-xc8ihSEkiyTOnsKDkzB7TIi24vv_lCIFuwPUNk" }, "test_vector_wrong_audience": { "fixture_id": "tok_test_wrong_aud_06", "description": "Access token issued for a different API (billing). A resource server for api.example.com must reject it (token pass-through / confused deputy).", "intended_outcome": "invalid_audience", "expected_error": { "pyjwt": "InvalidAudienceError", "jsonwebtoken": "JsonWebTokenError", "jsonwebtoken_message": "jwt audience invalid. expected: https://api.example.com/v1" }, "verification": { "algorithms": [ "HS256" ], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": [ "iss", "sub", "aud", "exp", "iat", "jti", "client_id" ], "required_typ": "at+jwt" }, "header": { "alg": "HS256", "typ": "at+jwt", "kid": "aptdot-test-hs256-01" }, "payload": { "iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://billing.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792490100, "nbf": 1792490100, "exp": 1792493700, "jti": "3d0b7f4e-8a5c-4d2b-9e6f-0c9b8a7f6e54", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792490080, "amr": [ "pwd", "otp", "mfa" ], "org_id": "org_enterprise_01", "workspace_roles": { "ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor" } }, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9iaWxsaW5nLmV4YW1wbGUuY29tL3YxIiwiY2xpZW50X2lkIjoiY2xpZW50X3dlYl9hcHBfOTkxODIzIiwiaWF0IjoxNzkyNDkwMTAwLCJuYmYiOjE3OTI0OTAxMDAsImV4cCI6MTc5MjQ5MzcwMCwianRpIjoiM2QwYjdmNGUtOGE1Yy00ZDJiLTllNmYtMGM5YjhhN2Y2ZTU0Iiwic2NvcGUiOiJkYXRhOnJlY29yZHM6cmVhZCBkYXRhOnJlY29yZHM6d3JpdGUgZGF0YTpyZWNvcmRzOmV4cG9ydCB3b3Jrc3BhY2U6c2V0dGluZ3M6cmVhZCB0ZWFtOm1lbWJlcnM6cmVhZCIsImF1dGhfdGltZSI6MTc5MjQ5MDA4MCwiYW1yIjpbInB3ZCIsIm90cCIsIm1mYSJdLCJvcmdfaWQiOiJvcmdfZW50ZXJwcmlzZV8wMSIsIndvcmtzcGFjZV9yb2xlcyI6eyJ3c19wcm9kX2V1Ijoid29ya3NwYWNlX2VkaXRvciIsIndzX3N0YWdpbmciOiJ3b3Jrc3BhY2VfZWRpdG9yIn19.SOCFZH04GcAYJhRIGLlagGF7dsm55r6G_6qXBCTmKmA" }, "test_vector_bad_signature": { "fixture_id": "tok_test_bad_signature_07", "description": "Valid-looking access token signed with a different key. Signature verification must fail.", "intended_outcome": "invalid_signature", "expected_error": { "pyjwt": "InvalidSignatureError", "jsonwebtoken": "JsonWebTokenError", "jsonwebtoken_message": "invalid signature" }, "verification": { "algorithms": [ "HS256" ], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": [ "iss", "sub", "aud", "exp", "iat", "jti", "client_id" ], "required_typ": "at+jwt" }, "header": { "alg": "HS256", "typ": "at+jwt", "kid": "aptdot-test-hs256-01" }, "payload": { "iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://api.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792490100, "nbf": 1792490100, "exp": 1792493700, "jti": "4e1c8a5f-9b6d-4e3c-8f7a-1d0c9b8a7f65", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792490080, "amr": [ "pwd", "otp", "mfa" ], "org_id": "org_enterprise_01", "workspace_roles": { "ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor" } }, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0OTAxMDAsIm5iZiI6MTc5MjQ5MDEwMCwiZXhwIjoxNzkyNDkzNzAwLCJqdGkiOiI0ZTFjOGE1Zi05YjZkLTRlM2MtOGY3YS0xZDBjOWI4YTdmNjUiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDkwMDgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0.bM5CeUDWyYjqR7DdhPHgHT0EBc5cTbEmGyHENSMgucE" }, "test_vector_alg_none": { "fixture_id": "tok_test_alg_none_08", "description": "Unsigned token with alg none (CVE-2015-9235 class). Verifiers must only accept the algorithms they expect.", "intended_outcome": "invalid_algorithm", "expected_error": { "pyjwt": "InvalidAlgorithmError", "jsonwebtoken": "JsonWebTokenError", "jsonwebtoken_message": "jwt signature is required" }, "verification": { "algorithms": [ "HS256" ], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": [ "iss", "sub", "aud", "exp", "iat", "jti", "client_id" ], "required_typ": "at+jwt" }, "header": { "alg": "none", "typ": "at+jwt" }, "payload": { "iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://api.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792490100, "nbf": 1792490100, "exp": 1792493700, "jti": "5f2d9b6a-0c7e-4f4d-9a8b-2e1d0c9b8a76", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792490080, "amr": [ "pwd", "otp", "mfa" ], "org_id": "org_enterprise_01", "workspace_roles": { "ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor" } }, "token": "eyJhbGciOiJub25lIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0OTAxMDAsIm5iZiI6MTc5MjQ5MDEwMCwiZXhwIjoxNzkyNDkzNzAwLCJqdGkiOiI1ZjJkOWI2YS0wYzdlLTRmNGQtOWE4Yi0yZTFkMGM5YjhhNzYiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDkwMDgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0." } }}123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132{ "$schema": "https://json-schema.org/draft/2020-12/schema", "$id": "https://www.aptdot.com/data/v1/jwt-claims-reference.schema.json", "title": "Aptdot JWT Claims Reference & Signed Test Token Fixtures", "type": "object", "required": ["metadata", "registered_claims_dictionary", "token_fixtures"], "$defs": { "requirement": { "type": "string", "enum": ["required", "optional", "not_defined"] }, "numericDate": { "type": "integer", "minimum": 0 } }, "properties": { "metadata": { "type": "object", "required": ["name", "version", "date_modified", "license", "license_url", "schema", "source", "reference_time", "reference_time_epoch", "test_signing_key", "total_registered_claims", "total_token_fixtures", "description"], "properties": { "name": { "type": "string" }, "version": { "type": "string", "pattern": "^\\d+\\.\\d+\\.\\d+$" }, "date_modified": { "type": "string", "format": "date" }, "license": { "const": "CC0-1.0" }, "license_url": { "type": "string", "format": "uri" }, "schema": { "type": "string", "format": "uri" }, "source": { "type": "string", "format": "uri" }, "reference_time": { "type": "string", "format": "date-time" }, "reference_time_epoch": { "$ref": "#/$defs/numericDate" }, "specifications": { "type": "object", "additionalProperties": { "type": "string", "format": "uri" } }, "test_signing_key": { "type": "object", "required": ["kid", "alg", "secret", "warning"], "properties": { "kid": { "type": "string" }, "alg": { "const": "HS256" }, "secret": { "type": "string", "minLength": 32 }, "warning": { "type": "string" } } }, "related_datasets": { "type": "array", "items": { "type": "string", "format": "uri" } }, "persona_note": { "type": "string" }, "total_registered_claims": { "type": "integer", "minimum": 1 }, "total_token_fixtures": { "type": "integer", "minimum": 1 }, "description": { "type": "string" } } }, "registered_claims_dictionary": { "type": "array", "items": { "type": "object", "required": ["claim", "name", "type", "rfc_spec", "required_in", "description", "security_considerations"], "properties": { "claim": { "type": "string", "enum": ["iss", "sub", "aud", "exp", "nbf", "iat", "jti"] }, "name": { "type": "string" }, "type": { "type": "string" }, "rfc_spec": { "type": "string", "format": "uri" }, "required_in": { "type": "object", "required": ["rfc7519", "oidc_id_token", "rfc9068_access_token"], "properties": { "rfc7519": { "$ref": "#/$defs/requirement" }, "oidc_id_token": { "$ref": "#/$defs/requirement" }, "rfc9068_access_token": { "$ref": "#/$defs/requirement" } } }, "description": { "type": "string" }, "security_considerations": { "type": "string" } } } }, "token_fixtures": { "type": "object", "additionalProperties": { "type": "object", "required": ["fixture_id", "description", "intended_outcome", "expected_error", "verification", "header", "payload", "token"], "properties": { "fixture_id": { "type": "string" }, "description": { "type": "string" }, "intended_outcome": { "type": "string", "enum": ["valid", "invalid_expired", "invalid_premature", "invalid_missing_claim", "invalid_audience", "invalid_signature", "invalid_algorithm"] }, "expected_error": { "oneOf": [ { "type": "null" }, { "type": "object", "required": ["pyjwt", "jsonwebtoken"], "properties": { "pyjwt": { "type": "string" }, "jsonwebtoken": { "type": "string" }, "jsonwebtoken_message": { "type": "string" } } } ] }, "verification": { "type": "object", "required": ["algorithms", "issuer", "audience", "required_claims"], "properties": { "algorithms": { "type": "array", "items": { "type": "string" } }, "issuer": { "type": "string" }, "audience": { "type": "string" }, "required_claims": { "type": "array", "items": { "type": "string" } }, "required_typ": { "type": "string" } } }, "header": { "type": "object", "required": ["alg"], "properties": { "alg": { "type": "string" }, "typ": { "type": "string" }, "kid": { "type": "string" } } }, "payload": { "type": "object", "properties": { "iss": { "type": "string" }, "sub": { "type": "string" }, "aud": { "oneOf": [{ "type": "string" }, { "type": "array", "items": { "type": "string" } }] }, "exp": { "$ref": "#/$defs/numericDate" }, "nbf": { "$ref": "#/$defs/numericDate" }, "iat": { "$ref": "#/$defs/numericDate" }, "auth_time": { "$ref": "#/$defs/numericDate" }, "jti": { "type": "string" }, "scope": { "type": "string" }, "amr": { "type": "array", "items": { "type": "string" } } } }, "token": { "type": "string", "pattern": "^[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]+\\.[A-Za-z0-9_-]*$" } }, "allOf": [ { "if": { "properties": { "intended_outcome": { "const": "valid" } } }, "then": { "properties": { "expected_error": { "type": "null" } } }, "else": { "properties": { "expected_error": { "type": "object" } } } } ] } } }}1234567{"claim": "iss", "name": "Issuer", "type": "StringOrURI", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.1", "required_in": {"rfc7519": "optional", "oidc_id_token": "required", "rfc9068_access_token": "required"}, "description": "Identifies the principal that issued the JWT, usually the authorization server's HTTPS issuer URL.", "security_considerations": "Compare with exact string equality against an allow-list of trusted issuers, and select verification keys per issuer, to block tokens from other identity providers."}{"claim": "sub", "name": "Subject", "type": "StringOrURI", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.2", "required_in": {"rfc7519": "optional", "oidc_id_token": "required", "rfc9068_access_token": "required"}, "description": "Identifies the principal the JWT is about, such as a user ID or service account ID.", "security_considerations": "Must be unique within the issuer. Key user records on iss + sub, never on email, because emails can change or be reassigned."}{"claim": "aud", "name": "Audience", "type": "StringOrURI or array of StringOrURI", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.3", "required_in": {"rfc7519": "optional", "oidc_id_token": "required", "rfc9068_access_token": "required"}, "description": "Identifies the recipients the JWT is intended for: an API identifier for access tokens, the client_id for ID tokens.", "security_considerations": "A resource server must reject tokens that do not list its own identifier in aud, to prevent token pass-through between APIs."}{"claim": "exp", "name": "Expiration Time", "type": "NumericDate (seconds since Unix epoch)", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.4", "required_in": {"rfc7519": "optional", "oidc_id_token": "required", "rfc9068_access_token": "required"}, "description": "The time on or after which the JWT must not be accepted for processing.", "security_considerations": "Keep access tokens short-lived (commonly 5 to 60 minutes). Allow only a small clock-skew leeway, typically 60 seconds or less."}{"claim": "nbf", "name": "Not Before", "type": "NumericDate (seconds since Unix epoch)", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.5", "required_in": {"rfc7519": "optional", "oidc_id_token": "not_defined", "rfc9068_access_token": "optional"}, "description": "The time before which the JWT must not be accepted for processing.", "security_considerations": "Reject when current_time + leeway < nbf. Useful for scheduled or deferred activation."}{"claim": "iat", "name": "Issued At", "type": "NumericDate (seconds since Unix epoch)", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.6", "required_in": {"rfc7519": "optional", "oidc_id_token": "required", "rfc9068_access_token": "required"}, "description": "The time at which the JWT was issued.", "security_considerations": "Lets a verifier compute token age and reject tokens issued before a password reset or session-revocation event."}{"claim": "jti", "name": "JWT ID", "type": "string (case-sensitive, unique per token)", "rfc_spec": "https://datatracker.ietf.org/doc/html/rfc7519#section-4.1.7", "required_in": {"rfc7519": "optional", "oidc_id_token": "not_defined", "rfc9068_access_token": "required"}, "description": "A unique identifier for the token.", "security_considerations": "Enables replay detection and revocation: store seen or revoked jti values until the token's exp passes."}12345678{"name": "enterprise_access_token", "fixture_id": "tok_access_valid_01", "description": "RFC 9068 OAuth 2.0 access token for a multi-tenant API: space-delimited scope, client_id, workspace roles and MFA evidence (amr). Valid at reference_time.", "intended_outcome": "valid", "expected_error": null, "verification": {"algorithms": ["HS256"], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": ["iss", "sub", "aud", "exp", "iat", "jti", "client_id"], "required_typ": "at+jwt"}, "header": {"alg": "HS256", "typ": "at+jwt", "kid": "aptdot-test-hs256-01"}, "payload": {"iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://api.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792490100, "nbf": 1792490100, "exp": 1792493700, "jti": "6f1c2a9e-3b7d-4e0f-9a8c-1d2e3f4a5b60", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792490080, "amr": ["pwd", "otp", "mfa"], "org_id": "org_enterprise_01", "workspace_roles": {"ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor"}}, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0OTAxMDAsIm5iZiI6MTc5MjQ5MDEwMCwiZXhwIjoxNzkyNDkzNzAwLCJqdGkiOiI2ZjFjMmE5ZS0zYjdkLTRlMGYtOWE4Yy0xZDJlM2Y0YTViNjAiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDkwMDgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0.9vfl5EINUfLQvs3kO3LJv6ByGFOSPIpeWNmoAuXMGuA"}{"name": "oidc_id_token", "fixture_id": "tok_id_valid_02", "description": "OpenID Connect ID token for the same user, issued to the web client (aud = client_id), with nonce and auth_time. Valid at reference_time.", "intended_outcome": "valid", "expected_error": null, "verification": {"algorithms": ["HS256"], "issuer": "https://auth.example.com/", "audience": "client_web_app_991823", "required_claims": ["iss", "sub", "aud", "exp", "iat"]}, "header": {"alg": "HS256", "typ": "JWT", "kid": "aptdot-test-hs256-01"}, "payload": {"iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "client_web_app_991823", "iat": 1792490100, "exp": 1792493700, "auth_time": 1792490080, "nonce": "n-0S6_WzA2Mj", "email": "sarah.lead@example.com", "email_verified": true, "name": "Sarah Lead", "amr": ["pwd", "otp", "mfa"]}, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiSldUIn0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiY2xpZW50X3dlYl9hcHBfOTkxODIzIiwiaWF0IjoxNzkyNDkwMTAwLCJleHAiOjE3OTI0OTM3MDAsImF1dGhfdGltZSI6MTc5MjQ5MDA4MCwibm9uY2UiOiJuLTBTNl9XekEyTWoiLCJlbWFpbCI6InNhcmFoLmxlYWRAZXhhbXBsZS5jb20iLCJlbWFpbF92ZXJpZmllZCI6dHJ1ZSwibmFtZSI6IlNhcmFoIExlYWQiLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl19.NS02x3zPhI338zN-m6L-DKP9p3rbZpo3xh767OXaw9I"}{"name": "test_vector_expired", "fixture_id": "tok_test_expired_03", "description": "Access token whose exp is 2 hours before reference_time. Must be rejected as expired.", "intended_outcome": "invalid_expired", "expected_error": {"pyjwt": "ExpiredSignatureError", "jsonwebtoken": "TokenExpiredError", "jsonwebtoken_message": "jwt expired"}, "verification": {"algorithms": ["HS256"], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": ["iss", "sub", "aud", "exp", "iat", "jti", "client_id"], "required_typ": "at+jwt"}, "header": {"alg": "HS256", "typ": "at+jwt", "kid": "aptdot-test-hs256-01"}, "payload": {"iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://api.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792479600, "nbf": 1792479600, "exp": 1792483200, "jti": "0a7e4c1b-5d2f-4a9e-8b3c-7f6e5d4c3b21", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792479580, "amr": ["pwd", "otp", "mfa"], "org_id": "org_enterprise_01", "workspace_roles": {"ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor"}}, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0Nzk2MDAsIm5iZiI6MTc5MjQ3OTYwMCwiZXhwIjoxNzkyNDgzMjAwLCJqdGkiOiIwYTdlNGMxYi01ZDJmLTRhOWUtOGIzYy03ZjZlNWQ0YzNiMjEiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDc5NTgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0.4r0RPI39n0glHgJyrbsqqMskGNSQtzX8Y0tJK35w0wA"}{"name": "test_vector_nbf_future", "fixture_id": "tok_test_premature_04", "description": "Access token with nbf 2 hours after reference_time (scheduled activation). Must be rejected as not yet valid.", "intended_outcome": "invalid_premature", "expected_error": {"pyjwt": "ImmatureSignatureError", "jsonwebtoken": "NotBeforeError", "jsonwebtoken_message": "jwt not active"}, "verification": {"algorithms": ["HS256"], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": ["iss", "sub", "aud", "exp", "iat", "jti", "client_id"], "required_typ": "at+jwt"}, "header": {"alg": "HS256", "typ": "at+jwt", "kid": "aptdot-test-hs256-01"}, "payload": {"iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://api.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792490100, "nbf": 1792497600, "exp": 1792501200, "jti": "1b8f5d2c-6e3a-4b0f-9c4d-8a7f6e5d4c32", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792490080, "amr": ["pwd", "otp", "mfa"], "org_id": "org_enterprise_01", "workspace_roles": {"ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor"}}, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0OTAxMDAsIm5iZiI6MTc5MjQ5NzYwMCwiZXhwIjoxNzkyNTAxMjAwLCJqdGkiOiIxYjhmNWQyYy02ZTNhLTRiMGYtOWM0ZC04YTdmNmU1ZDRjMzIiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDkwMDgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0.dAddr7k4423BVnUrsTns5aZD3hFVY_tD4C042hAOZ7I"}{"name": "test_vector_missing_iss", "fixture_id": "tok_test_missing_iss_05", "description": "Access token with no iss claim. Must be rejected when the verifier requires a trusted issuer.", "intended_outcome": "invalid_missing_claim", "expected_error": {"pyjwt": "MissingRequiredClaimError", "jsonwebtoken": "JsonWebTokenError", "jsonwebtoken_message": "jwt issuer invalid. expected: https://auth.example.com/"}, "verification": {"algorithms": ["HS256"], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": ["iss", "sub", "aud", "exp", "iat", "jti", "client_id"], "required_typ": "at+jwt"}, "header": {"alg": "HS256", "typ": "at+jwt", "kid": "aptdot-test-hs256-01"}, "payload": {"sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://api.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792490100, "nbf": 1792490100, "exp": 1792493700, "jti": "2c9a6e3d-7f4b-4c1a-8d5e-9b8a7f6e5d43", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792490080, "amr": ["pwd", "otp", "mfa"], "org_id": "org_enterprise_01", "workspace_roles": {"ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor"}}, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJzdWIiOiI4YjRhNWYzYy05ZDJlLTRiMGEtOGY3Yy02ZDFlM2E4ZjBiMDIiLCJhdWQiOiJodHRwczovL2FwaS5leGFtcGxlLmNvbS92MSIsImNsaWVudF9pZCI6ImNsaWVudF93ZWJfYXBwXzk5MTgyMyIsImlhdCI6MTc5MjQ5MDEwMCwibmJmIjoxNzkyNDkwMTAwLCJleHAiOjE3OTI0OTM3MDAsImp0aSI6IjJjOWE2ZTNkLTdmNGItNGMxYS04ZDVlLTliOGE3ZjZlNWQ0MyIsInNjb3BlIjoiZGF0YTpyZWNvcmRzOnJlYWQgZGF0YTpyZWNvcmRzOndyaXRlIGRhdGE6cmVjb3JkczpleHBvcnQgd29ya3NwYWNlOnNldHRpbmdzOnJlYWQgdGVhbTptZW1iZXJzOnJlYWQiLCJhdXRoX3RpbWUiOjE3OTI0OTAwODAsImFtciI6WyJwd2QiLCJvdHAiLCJtZmEiXSwib3JnX2lkIjoib3JnX2VudGVycHJpc2VfMDEiLCJ3b3Jrc3BhY2Vfcm9sZXMiOnsid3NfcHJvZF9ldSI6IndvcmtzcGFjZV9lZGl0b3IiLCJ3c19zdGFnaW5nIjoid29ya3NwYWNlX2VkaXRvciJ9fQ.K1kI-xc8ihSEkiyTOnsKDkzB7TIi24vv_lCIFuwPUNk"}{"name": "test_vector_wrong_audience", "fixture_id": "tok_test_wrong_aud_06", "description": "Access token issued for a different API (billing). A resource server for api.example.com must reject it (token pass-through / confused deputy).", "intended_outcome": "invalid_audience", "expected_error": {"pyjwt": "InvalidAudienceError", "jsonwebtoken": "JsonWebTokenError", "jsonwebtoken_message": "jwt audience invalid. expected: https://api.example.com/v1"}, "verification": {"algorithms": ["HS256"], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": ["iss", "sub", "aud", "exp", "iat", "jti", "client_id"], "required_typ": "at+jwt"}, "header": {"alg": "HS256", "typ": "at+jwt", "kid": "aptdot-test-hs256-01"}, "payload": {"iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://billing.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792490100, "nbf": 1792490100, "exp": 1792493700, "jti": "3d0b7f4e-8a5c-4d2b-9e6f-0c9b8a7f6e54", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792490080, "amr": ["pwd", "otp", "mfa"], "org_id": "org_enterprise_01", "workspace_roles": {"ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor"}}, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9iaWxsaW5nLmV4YW1wbGUuY29tL3YxIiwiY2xpZW50X2lkIjoiY2xpZW50X3dlYl9hcHBfOTkxODIzIiwiaWF0IjoxNzkyNDkwMTAwLCJuYmYiOjE3OTI0OTAxMDAsImV4cCI6MTc5MjQ5MzcwMCwianRpIjoiM2QwYjdmNGUtOGE1Yy00ZDJiLTllNmYtMGM5YjhhN2Y2ZTU0Iiwic2NvcGUiOiJkYXRhOnJlY29yZHM6cmVhZCBkYXRhOnJlY29yZHM6d3JpdGUgZGF0YTpyZWNvcmRzOmV4cG9ydCB3b3Jrc3BhY2U6c2V0dGluZ3M6cmVhZCB0ZWFtOm1lbWJlcnM6cmVhZCIsImF1dGhfdGltZSI6MTc5MjQ5MDA4MCwiYW1yIjpbInB3ZCIsIm90cCIsIm1mYSJdLCJvcmdfaWQiOiJvcmdfZW50ZXJwcmlzZV8wMSIsIndvcmtzcGFjZV9yb2xlcyI6eyJ3c19wcm9kX2V1Ijoid29ya3NwYWNlX2VkaXRvciIsIndzX3N0YWdpbmciOiJ3b3Jrc3BhY2VfZWRpdG9yIn19.SOCFZH04GcAYJhRIGLlagGF7dsm55r6G_6qXBCTmKmA"}{"name": "test_vector_bad_signature", "fixture_id": "tok_test_bad_signature_07", "description": "Valid-looking access token signed with a different key. Signature verification must fail.", "intended_outcome": "invalid_signature", "expected_error": {"pyjwt": "InvalidSignatureError", "jsonwebtoken": "JsonWebTokenError", "jsonwebtoken_message": "invalid signature"}, "verification": {"algorithms": ["HS256"], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": ["iss", "sub", "aud", "exp", "iat", "jti", "client_id"], "required_typ": "at+jwt"}, "header": {"alg": "HS256", "typ": "at+jwt", "kid": "aptdot-test-hs256-01"}, "payload": {"iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://api.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792490100, "nbf": 1792490100, "exp": 1792493700, "jti": "4e1c8a5f-9b6d-4e3c-8f7a-1d0c9b8a7f65", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792490080, "amr": ["pwd", "otp", "mfa"], "org_id": "org_enterprise_01", "workspace_roles": {"ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor"}}, "token": "eyJhbGciOiJIUzI1NiIsImtpZCI6ImFwdGRvdC10ZXN0LWhzMjU2LTAxIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0OTAxMDAsIm5iZiI6MTc5MjQ5MDEwMCwiZXhwIjoxNzkyNDkzNzAwLCJqdGkiOiI0ZTFjOGE1Zi05YjZkLTRlM2MtOGY3YS0xZDBjOWI4YTdmNjUiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDkwMDgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0.bM5CeUDWyYjqR7DdhPHgHT0EBc5cTbEmGyHENSMgucE"}{"name": "test_vector_alg_none", "fixture_id": "tok_test_alg_none_08", "description": "Unsigned token with alg none (CVE-2015-9235 class). Verifiers must only accept the algorithms they expect.", "intended_outcome": "invalid_algorithm", "expected_error": {"pyjwt": "InvalidAlgorithmError", "jsonwebtoken": "JsonWebTokenError", "jsonwebtoken_message": "jwt signature is required"}, "verification": {"algorithms": ["HS256"], "issuer": "https://auth.example.com/", "audience": "https://api.example.com/v1", "required_claims": ["iss", "sub", "aud", "exp", "iat", "jti", "client_id"], "required_typ": "at+jwt"}, "header": {"alg": "none", "typ": "at+jwt"}, "payload": {"iss": "https://auth.example.com/", "sub": "8b4a5f3c-9d2e-4b0a-8f7c-6d1e3a8f0b02", "aud": "https://api.example.com/v1", "client_id": "client_web_app_991823", "iat": 1792490100, "nbf": 1792490100, "exp": 1792493700, "jti": "5f2d9b6a-0c7e-4f4d-9a8b-2e1d0c9b8a76", "scope": "data:records:read data:records:write data:records:export workspace:settings:read team:members:read", "auth_time": 1792490080, "amr": ["pwd", "otp", "mfa"], "org_id": "org_enterprise_01", "workspace_roles": {"ws_prod_eu": "workspace_editor", "ws_staging": "workspace_editor"}}, "token": "eyJhbGciOiJub25lIiwidHlwIjoiYXQrand0In0.eyJpc3MiOiJodHRwczovL2F1dGguZXhhbXBsZS5jb20vIiwic3ViIjoiOGI0YTVmM2MtOWQyZS00YjBhLThmN2MtNmQxZTNhOGYwYjAyIiwiYXVkIjoiaHR0cHM6Ly9hcGkuZXhhbXBsZS5jb20vdjEiLCJjbGllbnRfaWQiOiJjbGllbnRfd2ViX2FwcF85OTE4MjMiLCJpYXQiOjE3OTI0OTAxMDAsIm5iZiI6MTc5MjQ5MDEwMCwiZXhwIjoxNzkyNDkzNzAwLCJqdGkiOiI1ZjJkOWI2YS0wYzdlLTRmNGQtOWE4Yi0yZTFkMGM5YjhhNzYiLCJzY29wZSI6ImRhdGE6cmVjb3JkczpyZWFkIGRhdGE6cmVjb3Jkczp3cml0ZSBkYXRhOnJlY29yZHM6ZXhwb3J0IHdvcmtzcGFjZTpzZXR0aW5nczpyZWFkIHRlYW06bWVtYmVyczpyZWFkIiwiYXV0aF90aW1lIjoxNzkyNDkwMDgwLCJhbXIiOlsicHdkIiwib3RwIiwibWZhIl0sIm9yZ19pZCI6Im9yZ19lbnRlcnByaXNlXzAxIiwid29ya3NwYWNlX3JvbGVzIjp7IndzX3Byb2RfZXUiOiJ3b3Jrc3BhY2VfZWRpdG9yIiwid3Nfc3RhZ2luZyI6IndvcmtzcGFjZV9lZGl0b3IifX0."}README.mdAdded+84
jwt-claims-reference.jsonAdded+550
jwt-claims-reference.schema.jsonAdded+132
records-registered_claims.jsonlAdded+7
records-token_fixtures.jsonlAdded+8