Skip to content

Commit 6a05075

Browse files
authored
docs: document identity option for JWT & Azure AD guard (aklivity#321)
1 parent 0a5af41 commit 6a05075

File tree

4 files changed

+38
-20
lines changed

4 files changed

+38
-20
lines changed

src/concepts/security/guard/azure-ad/README.md

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -58,12 +58,13 @@ guards:
5858

5959
The `azure-ad` specific options.
6060

61-
| Property | Type | Description |
62-
|-------------------|-------------------------------|-----------------------------|
63-
| options.issuer | `string` | Default: `organizations` |
64-
| options.audience | `string` | Audience claim. |
65-
| options.version | `enum` [ `v1.0`, `v2.0` ] | Default: `v2.0` |
66-
| options.challenge | `integer` | Challenge period (seconds). |
61+
| Property | Type | Description |
62+
|-------------------|---------------------------|-----------------------------|
63+
| options.issuer | `string` | Default: `organizations` |
64+
| options.audience | `string` | Audience claim. |
65+
| options.version | `enum` [ `v1.0`, `v2.0` ] | Default: `v2.0` |
66+
| options.challenge | `integer` | Challenge period (seconds). |
67+
| options.identity | `string` | Default: `sub` |
6768

6869
:::
6970

src/concepts/security/guard/jwt/README.md

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -57,19 +57,24 @@ guards:
5757

5858
The `jwt` specific options.
5959

60-
| Property | Type | Description |
61-
| -- | -- | -- |
62-
| options.issuer | `string` | Issuer claim. |
63-
| options.audience | `string` | Audience claim. |
64-
| options.challenge | `integer` | Challenge period (seconds). |
65-
| options.keys | `string`, `object[]` | If not specified, the JWT vault derives the key location from the issuer's `.well-known/jwks.json`. It can also be set as a URI string or a list of objects with supported key values. |
66-
| options.keys.kty | `string` | Key type, e.g. "RSA" , "EC". |
67-
| options.keys.kid | `string` | Key ID. |
68-
| options.keys.n | `string` | "RSA" modulus. |
69-
| options.keys.e | `string` | "RSA" exponent. |
70-
| options.keys.alg | `string` | "RSA" algorithm, e.g. "RS256". |
71-
| options.keys.crv | `string` | "EC" curve name. |
72-
| options.keys.x | `string` | "EC" point X coordinate. |
73-
| options.keys.y | `string` | "EC" point Y coordinate. |
60+
| Property | Type | Description |
61+
|-------------------|------------------------|----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
62+
| options.issuer | `string` | Issuer claim. |
63+
| options.audience | `string` | Audience claim. |
64+
| options.challenge | `integer` | Challenge period (seconds). |
65+
| options.identity | `string` | Default: `sub` |
66+
| options.keys | `string`, `object[]` | If not specified, the JWT vault derives the key location from the issuer's `.well-known/jwks.json`. It can also be set as a URI string or a list of objects with supported key values. |
67+
| options.keys.kty | `string` | Key type, e.g. "RSA" , "EC". |
68+
| options.keys.kid | `string` | Key ID. |
69+
| options.keys.n | `string` | "RSA" modulus. |
70+
| options.keys.e | `string` | "RSA" exponent. |
71+
| options.keys.alg | `string` | "RSA" algorithm, e.g. "RS256". |
72+
| options.keys.crv | `string` | "EC" curve name. |
73+
| options.keys.x | `string` | "EC" point X coordinate. |
74+
| options.keys.y | `string` | "EC" point Y coordinate. |
7475

7576
:::
77+
78+
## Reference
79+
80+
[`jwt` Guard](/reference/config/guards/jwt.md)

src/reference/config/guards/azure-ad.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -80,3 +80,9 @@ Azure AD version.
8080
> `integer`
8181

8282
Challenge period (seconds).
83+
84+
#### options.identity
85+
86+
> `string` | Default: `sub`
87+
88+
Claim to extract the user's identity from the token.

src/reference/config/guards/jwt.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,12 @@ Audience claim.
9595

9696
Challenge period (seconds).
9797

98+
#### options.identity
99+
100+
> `string` | Default: `sub`
101+
102+
Claim to extract the user's identity from the token.
103+
98104
#### options.keys
99105

100106
> `string`, `array` of `object`

0 commit comments

Comments
 (0)