Skip to content

Commit

Permalink
Merge pull request #337
Browse files Browse the repository at this point in the history
Entra login
  • Loading branch information
arcshiftsolutions authored Jul 24, 2023
2 parents 34daa07 + 82320ce commit 013c7a2
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,13 @@ protected void authenticateImpl(AuthenticationFlowContext context, SerializedBro
String username = ((List<String>) brokerContext.getContextData().get("user.attributes.username")).get(0);

switch (accountType) {
case "entra":
logger.debug("SOAM: Account type entra found");
if (username == null) {
throw new SoamRuntimeException("No entra oid value was found in token");
}
createOrUpdateUser((String) otherClaims.get("entra_user_id"), accountType, "ENTRA", null);
break;
case "bceidbasic":
logger.debug("SOAM: Account type bceid found");
if (username == null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,15 @@ public void authenticate(AuthenticationFlowContext context) {
String user_guid = null;

switch (accountType) {
case "entra":
logger.debug("SOAM Post: Account type entra found");
user_guid = (String) otherClaims.get("entra_user_id");
existingUser.setSingleAttribute("user_guid", user_guid);
if (user_guid == null) {
throw new SoamRuntimeException("No entra_user_id value was found in token");
}
updateUserInfo(user_guid, accountType, "ENTRA", null);
break;
case "bceidbasic":
logger.debug("SOAM Post: Account type basic bceid found");
user_guid = (String) otherClaims.get("bceid_user_guid");
Expand Down

0 comments on commit 013c7a2

Please sign in to comment.