Skip to content

Commit

Permalink
feat: document mirror_top_level_claims (#1652)
Browse files Browse the repository at this point in the history
  • Loading branch information
hperl authored Feb 16, 2024
1 parent 444e44c commit 4fa4b54
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions docs/oauth2-oidc/jwt-access-token.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -169,3 +169,27 @@ Which results in an access token with the following structure:
// ...
}
```

### Disable mirroring the claims under `ext`

By default, all custom claims will be mirrored in the `ext` claim (as is the case with the claim `some_custom_claim` in the
example above).

Set `oauth2.mirror_top_level_claims` to `false` to disable mirroring the claims in the nested `ext` claim:

```shell
ory patch oauth2-config {project.id} \
--replace "/oauth2/mirror_top_level_claims=false"
```

This results in an access token with the following structure:

```json
{
"sub": "...",
// ...
"some_custom_claim": "some_custom_value"
// no "ext" claim
// ...
}
```

0 comments on commit 4fa4b54

Please sign in to comment.