Skip to content

Commit 43a797d

Browse files
feat: adds displayName property to OIDC authentication module (requarks#6096)
* Adds displayName property to oidc authentication method * fix: update displayName prop * fix: use blank display name in oidc auth --------- Co-authored-by: Nicolas Giard <[email protected]>
1 parent 5f876ce commit 43a797d

File tree

2 files changed

+12
-4
lines changed

2 files changed

+12
-4
lines changed

server/modules/authentication/oidc/authentication.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,8 @@ module.exports = {
2828
providerKey: req.params.strategy,
2929
profile: {
3030
...profile,
31-
email: _.get(profile, '_json.' + conf.emailClaim)
31+
email: _.get(profile, '_json.' + conf.emailClaim),
32+
displayName: _.get(profile, conf.displayNameClaim, ''),
3233
}
3334
})
3435
if (conf.mapGroups) {

server/modules/authentication/oidc/definition.yml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,21 +49,28 @@ props:
4949
default: email
5050
maxWidth: 500
5151
order: 7
52+
displayNameClaim:
53+
type: String
54+
title: Display Name Claim
55+
hint: Field containing the user display name
56+
default: displayName
57+
maxWidth: 500
58+
order: 8
5259
mapGroups:
5360
type: Boolean
5461
title: Map Groups
5562
hint: Map groups matching names from the groups claim value
5663
default: false
57-
order: 8
64+
order: 9
5865
groupsClaim:
5966
type: String
6067
title: Groups Claim
6168
hint: Field containing the group names
6269
default: groups
6370
maxWidth: 500
64-
order: 9
71+
order: 10
6572
logoutURL:
6673
type: String
6774
title: Logout URL
6875
hint: (optional) Logout URL on the OAuth2 provider where the user will be redirected to complete the logout process.
69-
order: 10
76+
order: 11

0 commit comments

Comments
 (0)