You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs: restore JWT Claims Mapping section to authentication.mdx
The JWT Claims Mapping section was inadvertently removed during the merge
conflict resolution in commit da30906. This commit restores the complete
Claims Mapping documentation including:
- Default mapping paths explanation
- claims_mapping configuration option details
- Custom override examples with JSON Pointer syntax
- Example JWT payload and resulting metadata
- Notes about invalid expressions being silently ignored
Co-authored-by: Mark Phelps <[email protected]>
audiences: https://flipt.io/, https://flipt.com/ # at least one audience must match
529
529
```
530
+
531
+
#### Claims Mapping
532
+
533
+
By default, Flipt extracts user attributes from JWT claims using predefined paths within the JWT payload. The default mappings are:
534
+
535
+
- `email`from `/user/email`
536
+
- `name`from `/user/name`
537
+
- `sub`from `/user/sub`
538
+
- `picture`from `/user/image`
539
+
- `role`from `/user/role`
540
+
541
+
You can customize these mappings using the `claims_mapping` configuration option. This allows you to specify [JSON Pointer](https://datatracker.ietf.org/doc/html/rfc6901) expressions to extract user attributes from different locations in the JWT payload.
542
+
543
+
The custom mappings are merged with the default mappings, so you can override specific attributes while keeping the defaults for others.
544
+
545
+
<Note>
546
+
Only the predefined attribute names (`email`, `name`, `sub`, `picture`,
547
+
`role`) are supported in claims mapping. Custom attribute names are not
548
+
allowed to ensure compatibility with consuming code.
0 commit comments