Skip to content

Commit

Permalink
fix: test to verify kc idp hint
Browse files Browse the repository at this point in the history
  • Loading branch information
NithinKuruba committed Dec 6, 2024
1 parent 41e184c commit 94b4d4c
Showing 1 changed file with 7 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -51,20 +51,20 @@ public void authenticate(AuthenticationFlowContext context) {
}
}

String hintIdp = "";

if (context.getUriInfo().getQueryParameters().containsKey(AdapterConstants.KC_IDP_HINT)) {
hintIdp = context.getUriInfo().getQueryParameters().getFirst(AdapterConstants.KC_IDP_HINT);
String hintIdp = context.getUriInfo().getQueryParameters().getFirst(AdapterConstants.KC_IDP_HINT);
if (hintIdp != null && !hintIdp.equals("") && idpContext.containsKey(hintIdp)) {
context.attempted();
return;
}
}

// if only one IDP is enabled or hint IDP is passed, skip the form
if (!idpContext.isEmpty() && idpContext.size() == 1 && hintIdp != "") {
// if only one IDP is enabled then skip the form
if (!idpContext.isEmpty() && idpContext.size() == 1) {
context.attempted();
return;
}

log.infof("hint idp: %s", hintIdp);

MultivaluedMap<String, String> formData = new MultivaluedHashMap<>();

try {
Expand Down

0 comments on commit 94b4d4c

Please sign in to comment.