Repository navigation
Expand file tree
/
Copy pathpatch.patch
More file actions
604 lines (498 loc) · 22.5 KB
/
Copy pathpatch.patch
File metadata and controls
604 lines (498 loc) · 22.5 KB
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
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
diff --git a/README.md b/README.md
index dc8ad46c2cb050d432f182eff92983b59399bbe8..141acbee2333e3a2fe4a46dda3d67406eb34e6f2 100644
--- a/README.md
+++ b/README.md
@@ -1,413 +1,448 @@
[](https://packagist.org/packages/phithi92/json-web-token) [](https://github.com/phithi92/json-web-token/releases) [](LICENSE) [](https://github.com/phithi92/json-web-token/issues) [](https://github.com/phithi92/json-web-token/actions) [](https://packagist.org/packages/phithi92/json-web-token)
# JSON Web Token (JWT) Library
-**Security-first JWT implementation for PHP 8.2+.**
+**Security-first JWT implementation for PHP 8.2+.**
Create, sign, encrypt, decrypt, validate, and reissue JSON Web Tokens with explicit key management and strict defaults.
-Supports **JWS** and **JWE**, a pluggable algorithm registry, and fine-grained claim validation—without hiding security decisions behind magic defaults.
+The library supports both **JWS** and **JWE**, uses a pluggable algorithm registry, and keeps security decisions visible instead of hiding them behind magic defaults.
---
-## Highlights
+## What this library gives you
-- ✅ RFC-compliant (JWS, JWE, JWA, JWT, JWK)
-- 🔐 Secure-by-default claim validation and key handling
-- 🧩 Clear separation of concerns (keys, payloads, algorithms, validation)
-- 🔁 Built-in reissue / refresh workflows
-- 🧪 Explicit *testing-only* escape hatches
+- ✅ RFC-compliant JWT, JWS, JWE, JWA, and JWK-related workflows
+- 🔐 Explicit key, passphrase, algorithm, and `kid` handling
+- 🧩 Separate building blocks for keys, payloads, token processing, and claim validation
+- 🔁 Built-in reissue / refresh support
+- 🧪 Clearly marked unsafe methods for testing and tooling only
---
## Installation
```bash
composer require phithi92/json-web-token:^2.0
```
### Requirements
- PHP **8.2+**
-- OpenSSL extension (required)
+- OpenSSL extension
- `phpseclib/phpseclib` (installed automatically)
---
## Interoperability
-Tokens produced by this library are fully RFC-compliant and interoperable
-with other JWT implementations across different languages and platforms.
+Tokens produced by this library are standards-compliant and can be exchanged with other JWT libraries as long as the same algorithms, keys, and claims are used.
-No proprietary headers, claims, or encoding shortcuts are introduced.
-As long as the same algorithms, keys, and claims are used, tokens can be
-safely exchanged with other standards-compliant JWT stacks.
+The library does not introduce proprietary headers, custom encodings, or non-standard token formats.
---
## Supported RFCs
- **RFC 7515** — JSON Web Signature (JWS)
- **RFC 7516** — JSON Web Encryption (JWE)
- **RFC 7517** — JSON Web Key (JWK, reference formats)
- **RFC 7518** — JSON Web Algorithms (JWA)
- **RFC 7519** — JSON Web Token (JWT)
- **RFC 7638** — JWK Thumbprints (`kid` derivation)
---
-## Architecture Overview
+## How the library is structured
+### Main components
+
+```text
+JwtKeyManager → keys, passphrases, algorithm metadata, kid resolution
+JwtPayload → claims and type-safe helpers
+JwtValidator → issuer, audience, time, private claims, replay protection
+JwtTokenService → issue, serialize, read, decrypt, validate, reissue
+JwtBundle → parsed token aggregate (header + payload + crypto parts)
```
-JwtKeyManager → keys, algorithms, passphrases
-JwtPayload → claims & type-safe helpers
-JwtTokenService → create / decrypt / reissue
-JwtValidator → issuer, audience, claims, replay protection
-JwtBundle → parsed token aggregate
-```
-Each component is usable independently, but the default factory wires everything safely for you.
+### Mental model
+
+A typical workflow looks like this:
+
+1. Register key material in `JwtKeyManager`.
+2. Build claims with `JwtPayload` or pass an array.
+3. Define validation rules with `JwtValidator`.
+4. Create or read tokens through `JwtTokenService`.
+5. Optionally deny a `jti` after use to prevent replay.
+
+If you only want one entry point, use `JwtTokenServiceFactory::createDefault()`.
---
-## `JwtTokenService` Default Wiring (`createDefault()`)
+## Default service wiring
-`JwtTokenServiceFactory::createDefault()` is intentionally opinionated and builds a **consistent default dependency graph** so all operations share the same baseline behavior.
+`JwtTokenServiceFactory::createDefault()` builds a fresh, opinionated service graph for one library instance.
-Internally, it creates:
+It creates:
-- one shared `JwtValidator` instance (default: no expected issuer/audience, no clock skew, no private-claim expectations, no JTI registry)
+- one shared `JwtValidator` instance
+ - defaults: no expected issuer, no expected audience, no clock skew,
+ no private-claim expectations, no JTI registry
- one `JwtPayloadCodec`
- one `JwtTokenIssuerFactory`
- one `JwtTokenDecryptorFactory`
-- one `JwtTokenCreator` (with the shared default validator)
+- one `JwtTokenCreator`
- one `JwtTokenReader`
-- one `JwtClaimsValidationService` (with the shared default validator)
-- one `JwtTokenReissuer` (with the shared default validator)
+- one `JwtClaimsValidationService`
+- one `JwtTokenReissuer`
-This means:
+Important behavior:
-- Passing `null` as validator uses the shared default validator of this service instance.
-- `createDefault()` returns a **fresh service graph per call** (instances are not reused globally).
-- Claim validation is only as strict as your configured `JwtValidator`; for production you should usually pass an explicit validator with issuer/audience/JTI expectations.
+- Passing `null` as validator uses the shared default validator from that service instance.
+- Each `createDefault()` call returns a **new** dependency graph.
+- Production code should usually provide an explicit `JwtValidator` with issuer, audience, and optional JTI requirements.
-> `createTokenWithoutClaimValidation()` and `decryptTokenWithoutClaimValidation()` are intentionally unsafe escape hatches for tests/tooling.
+> `createTokenWithoutClaimValidation()` and `decryptTokenWithoutClaimValidation()` are intentionally unsafe escape hatches for tests and tooling.
---
-## Quick Start
+## Quick start
-### 1) Configure Keys / Algorithms
+### 1) Register keys and secrets
-`JwtKeyManager` holds all keys in memory. **Asymmetric keys must be PEM-encoded.**
-Symmetric secrets (HMAC, `dir`) live in the passphrase store.
+`JwtKeyManager` stores all key material in memory.
+
+- **Asymmetric keys** must be PEM-encoded.
+- **Symmetric secrets** (for HMAC or direct encryption) are stored as passphrases.
```php
use Phithi92\JsonWebToken\Security\KeyManagement\JwtKeyManager;
$manager = new JwtKeyManager();
$manager->addKeyPair(
private: file_get_contents('/path/private.pem'),
public: file_get_contents('/path/public.pem'),
kid: 'main-key'
);
$manager->addPassphrase(
passphrase: getenv('JWT_KEY_PASSPHRASE'),
kid: 'main-key'
);
-// For symmetric algorithms (HS*, dir/A*GCM), register a shared secret
+// For symmetric algorithms such as HS256 or direct AES-GCM
$manager->addPassphrase(
passphrase: getenv('JWT_SHARED_SECRET'),
kid: 'HS256'
);
```
-> If no `kid` is provided when issuing tokens, one is derived from the JOSE header
-> (e.g. `RS256`, `RSA-OAEP-256.A256GCM`). Make sure the corresponding key is registered
-> under that `kid`, or pass a `kid` explicitly.
-
----
-
-### 2) Build a Payload
-
-`JwtPayload` provides helpers for standard claims and strict validation.
+### 2) Build the payload
```php
use Phithi92\JsonWebToken\Token\JwtPayload;
$payload = (new JwtPayload())
->setIssuer('https://issuer.example')
->setAudience('https://service.example')
->setIssuedAt('now')
->setExpiration('+15 minutes')
->setJwtId('token-123')
->addClaim('role', 'admin');
```
-Time-based helper setters such as `setIssuedAt()` and `setExpiration()` accept date/time strings, for example:
+Time helper methods such as `setIssuedAt()` and `setExpiration()` accept:
-- `"now"`
-- Relative strings (`+15 minutes`)
-- Absolute datetime strings (`2026-01-01T00:00:00+00:00`)
+- `'now'`
+- relative strings such as `'+15 minutes'`
+- absolute values such as `'2026-01-01T00:00:00+00:00'`
-> ℹ️ JWT `iat`, `nbf`, and `exp` are NumericDate values (seconds since Unix epoch in UTC).
-> Always generate and compare timestamps in UTC to avoid timezone drift.
+JWT time claims (`iat`, `nbf`, `exp`) are NumericDate values, so generate and compare them in UTC.
-If you want to set UNIX timestamps directly, use `setClaimTimestamp()`:
+If you already have timestamps, set them directly:
```php
$payload
->setClaimTimestamp('iat', time())
->setClaimTimestamp('exp', time() + 900);
```
----
+### 3) Define validation rules
-### 3) Create & Serialize a Token
+```php
+use Phithi92\JsonWebToken\Token\Validator\JwtValidator;
+
+$validator = new JwtValidator(
+ expectedIssuer: 'https://issuer.example',
+ expectedAudience: 'https://service.example',
+ clockSkew: 0,
+ expectedClaims: ['role' => 'admin']
+);
+```
+
+### 4) Create a token
```php
use Phithi92\JsonWebToken\Token\Factory\JwtTokenServiceFactory;
-use Phithi92\JsonWebToken\Token\Validator\JwtValidator;
-$service = JwtTokenServiceFactory::createDefault();
-$validator = new JwtValidator();
+$service = JwtTokenServiceFactory::createDefault();
$token = $service->createTokenString(
algorithm: 'RS256',
manager: $manager,
payload: $payload,
validator: $validator,
kid: 'main-key'
);
```
-You may also issue tokens directly from an array of claims:
+You can also create tokens from a plain claims array:
```php
$bundle = $service->createTokenFromArray(
algorithm: 'RS256',
manager: $manager,
- claims: ['iss' => 'https://issuer.example', 'exp' => time() + 900],
+ claims: [
+ 'iss' => 'https://issuer.example',
+ 'aud' => 'https://service.example',
+ 'exp' => time() + 900,
+ ],
validator: $validator,
kid: 'main-key'
);
```
----
+If you want the compact string directly from an array, use `createTokenStringFromArray()`.
-### 4) Read (verify/decrypt) & Validate
+### 5) Read, verify, or decrypt a token
```php
$bundle = $service->decryptToken(
token: $token,
manager: $manager,
validator: $validator
);
$payload = $bundle->getPayload();
```
-For JWS tokens this verifies the signature and reads the payload.
-For JWE tokens this decrypts and then validates claims.
+Behavior depends on the token type:
-#### Claim-Only Validation
+- For **JWS**, the library verifies the signature and returns the parsed bundle.
+- For **JWE**, the library decrypts the token and then validates the claims.
+
+### 6) Validate claims separately
```php
$isValid = $service->validateTokenClaims(
bundle: $bundle,
validator: $validator
);
```
-> ⚠️ `*WithoutClaimValidation()` methods exist **only** for tests or tooling.
+> Methods ending in `WithoutClaimValidation()` exist only for tests or tooling.
+
+### 7) Reissue a token
+
+```php
+$newBundle = $service->reissueBundle(
+ interval: '+30 minutes',
+ bundle: $bundle,
+ manager: $manager,
+ validator: $validator
+);
+```
+
+The original bundle stays unchanged.
+
+---
+
+## Choosing algorithms and `kid`s
-### 5) Business Rules & Replay Protection
+The algorithm controls which key material must exist in `JwtKeyManager`.
-`JwtValidator` can enforce issuer, audience, private claims **and** protect against JWT replay attacks via a pluggable JWT ID registry.
+### JWS algorithms
-### `jti` (JWT ID) Deep Dive
+- **HMAC:** `HS256`, `HS384`, `HS512`
+- **RSA:** `RS256`, `RS384`, `RS512`
+- **RSA-PSS:** `PS256`, `PS384`, `PS512`
+- **ECDSA:** `ES256`, `ES384`, `ES512`
-`jti` is the token identifier claim used to uniquely track a token and support replay prevention.
+### JWE algorithms
+
+- **RSA-OAEP + AES-GCM:** `RSA-OAEP/A256GCM`, `RSA-OAEP-256/A256GCM`
+- **Direct AES-GCM:** `A128GCM`, `A192GCM`, `A256GCM`
+
+The identifiers map to handlers via `resources/algorithms.php`.
+
+### `kid` resolution rules
+
+If you do not pass a `kid` while issuing, the library derives one from the JOSE header, for example:
+
+- `RS256`
+- `RSA-OAEP-256.A256GCM`
+
+Make sure the required key or passphrase was registered under that identifier, or pass a `kid` explicitly.
+
+Recommendation: pin both the algorithm and the `kid` per client or integration.
+
+> Prefer **RSA-PSS** for new RSA signatures and **AES-GCM** for authenticated encryption.
+
+---
+
+## Claim validation and replay protection
+
+`JwtValidator` can enforce:
+
+- issuer (`iss`)
+- audience (`aud`)
+- time-based claims (`exp`, `nbf`, `iat`)
+- private claims
+- JWT ID (`jti`) checks through a pluggable registry
+
+### `jti` behavior
+
+`jti` is the token identifier claim used for replay protection.
#### Validation behavior
- Without a `JwtIdValidatorInterface`, `jti` is optional and not checked.
- If a `JwtIdValidatorInterface` is configured, tokens **must** contain `jti`.
-- The validator then checks whether the `jti` is allowed by the configured backend (in-memory, Redis, PDO).
+- The configured backend decides whether that `jti` is allowed.
-#### Auto-generation behavior during issuing
+#### Issuing behavior
-When issuing via `JwtTokenService::createToken()` / `createTokenFromArray()` and the chosen validator has a JTI validator configured:
+When issuing with `createToken()` or `createTokenFromArray()` and the chosen validator has a JTI validator configured:
-- if `jti` is missing, a new random `jti` is generated automatically
-- this generated `jti` is pre-registered as allowed
-- if `exp` is missing in that situation, issuing fails (because JTI tracking needs expiry context)
+- a missing `jti` is generated automatically
+- the generated `jti` is pre-registered as allowed
+- issuing fails if `exp` is missing, because replay tracking needs expiry context
Practical recommendation:
-- Set `jti` and `exp` explicitly for all tokens that should be replay-protected.
-- Use `denyBundle()` after successful one-time use to invalidate the token ID for the remaining token lifetime.
-
-#### InMemoryJwtIdValidator
+- Set `jti` and `exp` explicitly for replay-protected tokens.
+- Call `denyBundle()` after successful one-time use.
-`InMemoryJwtIdValidator` is a simple, deterministic implementation intended for tests, demos, and short‑lived processes.
+### In-memory example
```php
use Phithi92\JsonWebToken\Token\Validator\InMemoryJwtIdValidator;
use Phithi92\JsonWebToken\Token\Validator\JwtValidator;
$jwtIdValidator = new InMemoryJwtIdValidator(
allowList: ['token-123'],
denyList: ['revoked-token'],
useAllowList: true
);
$validator = new JwtValidator(
expectedIssuer: 'https://issuer.example',
expectedAudience: 'https://service.example',
jwtIdValidator: $jwtIdValidator
);
```
-##### How `useAllowList` works
+#### How `useAllowList` works
-- **`useAllowList = true`**
- Only JWT IDs present in `allowList` are accepted.
- Useful for **single‑use tokens**, login flows, or explicit grants.
+- **`useAllowList = true`**<br>Only JWT IDs in `allowList` are accepted.<br>Good for single-use flows or explicit grants.
-- **`useAllowList = false` (default)**
- All JWT IDs are accepted **unless** they appear in `denyList`.
- Suitable for classic access tokens with revocation support.
+- **`useAllowList = false`**<br>All JWT IDs are accepted unless they appear in `denyList`.<br>Good for classic access tokens with revocation support.
-When a token is successfully validated, the service can deny its JWT ID to prevent replay:
+After successful validation you can deny the bundle's `jti`:
```php
$service->denyBundle($bundle, $validator);
```
-> ⚠️ `InMemoryJwtIdValidator` is process‑local and non‑persistent.
-> Use Redis or PDO validators for production replay protection.
-
-#### Storage backends for JTI replay protection
-
-- `InMemoryJwtIdValidator`: ideal for tests and local demos; state is process-local.
-- `RedisJwtIdValidator`: distributed runtime deny/allow lists with TTL support.
-- `PdoJwtIdValidator`: relational persistence (requires `jwt_id_list` table with expiry column).
+> `InMemoryJwtIdValidator` is process-local and not persistent. Use Redis or PDO-based validators for production replay protection.
-### 6) Refresh / Reissue Tokens
+### Available JTI backends
-```php
-$newBundle = $service->reissueBundle(
- interval: '+30 minutes',
- bundle: $bundle,
- manager: $manager,
- validator: $validator
-);
-```
-
-The original bundle remains untouched.
+- `InMemoryJwtIdValidator`: good for tests and local demos
+- `RedisJwtIdValidator`: distributed allow/deny lists with TTL support
+- `PdoJwtIdValidator`: relational persistence (`jwt_id_list` table with an expiry column)
---
-## Error Handling Patterns
+## Error handling
-When issuing, parsing, decrypting, or validating tokens, prefer catching **specific exception types first** and only then falling back to a generic handler.
+Catch specific exception types first and fall back to a generic handler only at the boundary of your application.
```php
use Phithi92\JsonWebToken\Exceptions\Token\InvalidTokenException;
use Phithi92\JsonWebToken\Exceptions\Token\MalformedTokenException;
use Phithi92\JsonWebToken\Exceptions\Token\UnsupportedTokenTypeException;
use Phithi92\JsonWebToken\Exceptions\Payload\ExpiredPayloadException;
use Phithi92\JsonWebToken\Exceptions\Payload\NotYetValidException;
use Phithi92\JsonWebToken\Exceptions\Payload\InvalidIssuerException;
use Phithi92\JsonWebToken\Exceptions\Payload\InvalidAudienceException;
use Phithi92\JsonWebToken\Exceptions\Crypto\SignatureVerificationException;
use Phithi92\JsonWebToken\Exceptions\Crypto\DecryptionException;
use Phithi92\JsonWebToken\Exceptions\Security\PassphraseNotFoundException;
try {
$bundle = $service->decryptToken(
token: $token,
manager: $manager,
validator: $validator
);
- // Optional extra claim validation step
$service->validateTokenClaims($bundle, $validator);
-
-} catch (ExpiredPayloadException|NotYetValidException $e) {
- // 401: token is time-invalid (expired or not active yet)
-} catch (InvalidIssuerException|InvalidAudienceException $e) {
+} catch (ExpiredPayloadException | NotYetValidException $e) {
+ // 401: token is time-invalid
+} catch (InvalidIssuerException | InvalidAudienceException $e) {
// 403: token is valid but not intended for this API/context
-} catch (SignatureVerificationException|DecryptionException $e) {
- // 401: signature/JWE auth check failed
-} catch (MalformedTokenException|InvalidTokenException|UnsupportedTokenTypeException $e) {
+} catch (SignatureVerificationException | DecryptionException $e) {
+ // 401: signature or JWE auth check failed
+} catch (MalformedTokenException | InvalidTokenException | UnsupportedTokenTypeException $e) {
// 400: structurally invalid or unsupported token
} catch (PassphraseNotFoundException $e) {
// 500: server-side key configuration problem
}
```
-### Recommended Mapping (API-friendly)
+### Recommended HTTP mapping
-- **400 Bad Request**: malformed token, missing parts, unsupported format/type
-- **401 Unauthorized**: invalid signature, failed decryption/auth tag, expired or not-yet-valid token
-- **403 Forbidden**: issuer/audience/private-claim mismatch
-- **500 Internal Server Error**: missing key material, passphrase, or other server misconfiguration
+- **400 Bad Request**: malformed token, missing parts, unsupported type or format
+- **401 Unauthorized**: invalid signature, failed decryption, expired token, not-yet-valid token
+- **403 Forbidden**: issuer, audience, or private-claim mismatch
+- **500 Internal Server Error**: missing keys, passphrases, or other server misconfiguration
-### Security Best Practices for Error Responses
+### Error response best practices
-- Return a **generic client message** (e.g. `"Invalid or expired token"`) to avoid leaking verification details.
-- Log the exact exception message internally with request correlation IDs.
-- Do not include secrets, raw token content, or key identifiers in public error payloads unless required.
+- Return a generic client-facing message such as `Invalid or expired token`.
+- Log the precise exception internally.
+- Avoid exposing secrets, raw token content, or sensitive key details in public responses.
---
-## Supported Algorithms
-
-Identifiers map to handlers via `resources/algorithms.php`.
-
-### JWS (signing)
-- **HMAC:** `HS256` · `HS384` · `HS512`
-- **RSA:** `RS256` · `RS384` · `RS512`
-- **RSA-PSS:** `PS256` · `PS384` · `PS512`
-- **ECDSA:** `ES256` · `ES384` · `ES512`
-
-### JWE (encryption)
-- **RSA-OAEP + AES-GCM:** `RSA-OAEP/A256GCM` · `RSA-OAEP-256/A256GCM`
-- **Direct AES-GCM:** `A128GCM` · `A192GCM` · `A256GCM`
-
-> Prefer **RSA-PSS** for new RSA signatures and **AES-GCM** for authenticated encryption. Pin algorithms per client.
-
----
-
-## Security Best Practices
+## Security checklist
- 🔑 Never commit keys or passphrases
-- 🔒 Always validate issuer & audience
+- 🔒 Always validate issuer and audience in production
- ⏱ Use short expiration windows
- 📌 Pin algorithms and `kid`s per client
- 🧯 Catch domain-specific exceptions only
+- 🧪 Treat `*WithoutClaimValidation()` methods as test-only APIs
---
## Development
```bash
composer install
-composer run keys # generate test keys
+composer run keys
composer run test
composer run analyse
```
---
## License
+
Released under the MIT License. See [LICENSE](LICENSE).
## Support the project
| [](https://ko-fi.com/R6R414XGWN) |  |
| ----------------------------------------------------------------------------------- | -------------------------------------------------------------------------------------------------------------------- |