Skip to content

Commit 4fa4b54

Browse files
authored
feat: document mirror_top_level_claims (#1652)
1 parent 444e44c commit 4fa4b54

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed

docs/oauth2-oidc/jwt-access-token.mdx

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,3 +169,27 @@ Which results in an access token with the following structure:
169169
// ...
170170
}
171171
```
172+
173+
### Disable mirroring the claims under `ext`
174+
175+
By default, all custom claims will be mirrored in the `ext` claim (as is the case with the claim `some_custom_claim` in the
176+
example above).
177+
178+
Set `oauth2.mirror_top_level_claims` to `false` to disable mirroring the claims in the nested `ext` claim:
179+
180+
```shell
181+
ory patch oauth2-config {project.id} \
182+
--replace "/oauth2/mirror_top_level_claims=false"
183+
```
184+
185+
This results in an access token with the following structure:
186+
187+
```json
188+
{
189+
"sub": "...",
190+
// ...
191+
"some_custom_claim": "some_custom_value"
192+
// no "ext" claim
193+
// ...
194+
}
195+
```

0 commit comments

Comments
 (0)