diff --git a/server/modules/authentication/oidc/authentication.js b/server/modules/authentication/oidc/authentication.js index de76da41..22a3f2c5 100644 --- a/server/modules/authentication/oidc/authentication.js +++ b/server/modules/authentication/oidc/authentication.js @@ -28,7 +28,8 @@ module.exports = { providerKey: req.params.strategy, profile: { ...profile, - email: _.get(profile, '_json.' + conf.emailClaim) + email: _.get(profile, '_json.' + conf.emailClaim), + displayName: _.get(profile, conf.displayNameClaim, ''), } }) if (conf.mapGroups) { diff --git a/server/modules/authentication/oidc/definition.yml b/server/modules/authentication/oidc/definition.yml index ae1c636a..4ec22e79 100644 --- a/server/modules/authentication/oidc/definition.yml +++ b/server/modules/authentication/oidc/definition.yml @@ -49,21 +49,28 @@ props: default: email maxWidth: 500 order: 7 + displayNameClaim: + type: String + title: Display Name Claim + hint: Field containing the user display name + default: displayName + maxWidth: 500 + order: 8 mapGroups: type: Boolean title: Map Groups hint: Map groups matching names from the groups claim value default: false - order: 8 + order: 9 groupsClaim: type: String title: Groups Claim hint: Field containing the group names default: groups maxWidth: 500 - order: 9 + order: 10 logoutURL: type: String title: Logout URL hint: (optional) Logout URL on the OAuth2 provider where the user will be redirected to complete the logout process. - order: 10 + order: 11