[KEYCLOAK-883] - Idp hint should be processed firts.

This commit is contained in:
pedroigor 2015-02-08 22:01:30 -02:00
parent 916ba57c40
commit cb72fa4788

View file

@ -867,16 +867,6 @@ public class OpenIDConnectService {
Response response = pageInitializer.processInput(); Response response = pageInitializer.processInput();
if (response != null) return response; if (response != null) return response;
ClientSessionModel clientSession = pageInitializer.clientSession; 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(); String accessCode = new ClientSessionCode(realm, clientSession).getCode();
if (idpHint != null && !"".equals(idpHint)) { if (idpHint != null && !"".equals(idpHint)) {
@ -892,6 +882,14 @@ public class OpenIDConnectService {
Urls.identityProviderAuthnRequest(this.uriInfo.getBaseUri(), identityProviderModel, realm, accessCode)).build(); 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<RequiredCredentialModel> requiredCredentials = realm.getRequiredCredentials(); List<RequiredCredentialModel> requiredCredentials = realm.getRequiredCredentials();
if (requiredCredentials.isEmpty()) { if (requiredCredentials.isEmpty()) {