From cb72fa4788ffe35da9a5ec1752742b9eb9ba92cb Mon Sep 17 00:00:00 2001 From: pedroigor Date: Sun, 8 Feb 2015 22:01:30 -0200 Subject: [PATCH] [KEYCLOAK-883] - Idp hint should be processed firts. --- .../protocol/oidc/OpenIDConnectService.java | 18 ++++++++---------- 1 file changed, 8 insertions(+), 10 deletions(-) diff --git a/services/src/main/java/org/keycloak/protocol/oidc/OpenIDConnectService.java b/services/src/main/java/org/keycloak/protocol/oidc/OpenIDConnectService.java index d6f79dd6ba..da7d190e17 100755 --- a/services/src/main/java/org/keycloak/protocol/oidc/OpenIDConnectService.java +++ b/services/src/main/java/org/keycloak/protocol/oidc/OpenIDConnectService.java @@ -867,16 +867,6 @@ public class OpenIDConnectService { Response response = pageInitializer.processInput(); if (response != null) return response; ClientSessionModel clientSession = pageInitializer.clientSession; - - - response = authManager.checkNonFormAuthentication(session, clientSession, realm, uriInfo, request, clientConnection, headers, event); - if (response != null) return response; - - if (prompt != null && prompt.equals("none")) { - OpenIDConnect oauth = new OpenIDConnect(session, realm, uriInfo); - return oauth.cancelLogin(clientSession); - } - String accessCode = new ClientSessionCode(realm, clientSession).getCode(); if (idpHint != null && !"".equals(idpHint)) { @@ -892,6 +882,14 @@ public class OpenIDConnectService { Urls.identityProviderAuthnRequest(this.uriInfo.getBaseUri(), identityProviderModel, realm, accessCode)).build(); } + response = authManager.checkNonFormAuthentication(session, clientSession, realm, uriInfo, request, clientConnection, headers, event); + if (response != null) return response; + + if (prompt != null && prompt.equals("none")) { + OpenIDConnect oauth = new OpenIDConnect(session, realm, uriInfo); + return oauth.cancelLogin(clientSession); + } + List requiredCredentials = realm.getRequiredCredentials(); if (requiredCredentials.isEmpty()) {