KEYCLOAK-2429

Disabled Google Identity Provider still kicks in when 'Authenticate by default' is enabled
This commit is contained in:
Stian Thorgersen 2016-02-08 19:51:21 +01:00
parent 5f41215e27
commit 635ccae144

View file

@ -98,7 +98,7 @@ public abstract class AuthorizationEndpointBase {
List<IdentityProviderModel> identityProviders = realm.getIdentityProviders();
for (IdentityProviderModel identityProvider : identityProviders) {
if (identityProvider.isAuthenticateByDefault()) {
if (identityProvider.isEnabled() && identityProvider.isAuthenticateByDefault()) {
// TODO if we are isPassive we should propagate this flag to default identity provider also if possible
return buildRedirectToIdentityProvider(identityProvider.getAlias(), new ClientSessionCode(realm, clientSession).getCode());
}