Skip to content

Commit c2fff66

Browse files
authored
Update Keycloak documentation with group membership details
Added instructions for including group membership in user tokens.
1 parent ac41872 commit c2fff66

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

_articles/keycloak.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,12 @@ title: Keycloak
55

66
## Terminology
77

8+
- **Claim configuration**
9+
- **Client**
10+
- **Client scope**
11+
- **Protocol mapper**
12+
- **Token**
13+
814
### Client > Client scopes
915

1016
Some built-in client scopes are:
@@ -32,3 +38,18 @@ Go to Clients -> (client name) -> Client scopes -> Evaluate.
3238
This allows you to see **protocol mappers** in action, and effectively see what a generated access token would look like, with the current settings.
3339

3440
This is very useful when integrating other apps with Keycloak, to see what data will be shared with the third party app.
41+
42+
### Include group membership in a user's token
43+
44+
If you want to include group membership in a user's token, you can do so on a per-client basis:
45+
46+
1. Navigate to Clients -> (your client app) -> Client scopes.
47+
2. Click the `client-name-dedicated` scope to edit it.
48+
3. Click **Configure a new mapper** -> **Group membership**
49+
4. Enter the details of the new mapper:
50+
- Name: anything you like
51+
- Token Claim Name: `groups` (this is the key name it will appear under, in the JSON)
52+
- Click Save.
53+
5. The new mapper should appear as Category=Token mapper, Type=Group Membership.
54+
and click **Add**.
55+
6. Verify the information is included in the user token by using the **Evaluate** tab (described above).

0 commit comments

Comments
 (0)