Skip to content

Commit

Permalink
[Backend] Add OpenID Connect SSO support for Microsoft ADFS to get us…
Browse files Browse the repository at this point in the history
…er claims from the id_token
  • Loading branch information
animedbz16 committed Jul 25, 2024
1 parent 850bdee commit 0a0c699
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions opencti-platform/opencti-graphql/src/config/providers.js
Original file line number Diff line number Diff line change
Expand Up @@ -355,10 +355,11 @@ for (let i = 0; i < providerKeys.length; i += 1) {
const emailAttribute = mappedConfig.email_attribute ?? 'email';
const firstnameAttribute = mappedConfig.firstname_attribute ?? 'given_name';
const lastnameAttribute = mappedConfig.lastname_attribute ?? 'family_name';
const name = userinfo[nameAttribute];
const email = userinfo[emailAttribute];
const firstname = userinfo[firstnameAttribute];
const lastname = userinfo[lastnameAttribute];
const decodedIdToken = jwtDecode(tokenset.id_token);
const name = userinfo[nameAttribute] || decodedIdToken[nameAttribute];
const email = userinfo[emailAttribute] || decodedIdToken[emailAttribute];
const firstname = userinfo[firstnameAttribute] || decodedIdToken[firstnameAttribute];
const lastname = userinfo[lastnameAttribute] || decodedIdToken[lastnameAttribute];
const opts = {
providerGroups: groupsToAssociate,
providerOrganizations: organizationsToAssociate,
Expand Down

0 comments on commit 0a0c699

Please sign in to comment.