File size: 25,004 Bytes
e932372 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 | {
"$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."
}
}
}
|