@@ -25,11 +25,43 @@ It allows you to :
2525Install the package from NuGet:
2626
2727``` sh
28- $ dotnet add package SimpleW.Helper.Jwt --version 26.0.0-rc.20260326-1604
28+ $ dotnet add package SimpleW.Helper.Jwt --version 26.0.0-rc.20260329-1623
2929```
3030
31+ ## Configuration options
3132
32- ### Creating a Token
33+ ### JwtBearerOptions
34+
35+ | Option | Default | Description |
36+ | ---------------- | ---------- | ---------------------------------------------------------------------------------------- |
37+ | SecretKey* | — | Secret key used to sign and validate JWT tokens (HMAC). Must be strong and kept private. |
38+ | ExpectedIssuer | ` null ` | Expected ` iss ` claim. If set, the token must match this value. |
39+ | ExpectedAudience | ` null ` | Expected ` aud ` claim. If set, the token must match this value. |
40+ | ClockSkew | ` 1 minute ` | Allowed clock drift when validating ` exp ` and ` nbf ` . |
41+ | Algorithm | ` HS256 ` | HMAC algorithm used to sign tokens (` HS256 ` , ` HS384 ` , ` HS512 ` ). |
42+
43+ ### CreateToken options
44+
45+ | Parameter | Default | Description |
46+ | --------------------- | -------------------------- | -------------------------------------------------------------------------------------------- |
47+ | options* | — | JWT configuration used for signing and default validation-related values. |
48+ | principal / identity* | — | Source object used to generate the JWT payload. |
49+ | lifetime* | — | Token validity duration. Used to compute ` exp ` . |
50+ | issuer | ` options.ExpectedIssuer ` | Optional issuer written into the ` iss ` claim. |
51+ | audience | ` options.ExpectedAudience ` | Optional audience written into the ` aud ` claim. |
52+ | nowUtc | ` DateTimeOffset.UtcNow ` | Optional UTC timestamp override used to compute ` iat ` , ` nbf ` , and ` exp ` . Useful for testing. |
53+
54+ ### TryValidateToken options
55+
56+ | Parameter | Description |
57+ | --------- | ------------------------------------------------------------------------------------------ |
58+ | options* | JWT configuration used to validate signature, issuer, audience, clock skew, and algorithm. |
59+ | token* | JWT string to validate. Must contain exactly 3 parts. |
60+ | principal | Output principal rebuilt from the token when validation succeeds. |
61+ | error | Output error message when validation fails. |
62+
63+
64+ ## Creating a Token
3365
3466A token is created from an identity.
3567
0 commit comments