[KEYCLOAK-3517] - Filtering SAML ECP flow

This commit is contained in:
Pedro Igor 2017-01-04 11:17:39 -02:00
parent 732d56b0c0
commit 4044b39ab7

View file

@ -37,6 +37,7 @@ import org.keycloak.models.AuthenticatorConfigModel;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.RequiredActionProviderModel;
import org.keycloak.models.utils.DefaultAuthenticationFlows;
import org.keycloak.models.utils.ModelToRepresentation;
import org.keycloak.models.utils.RepresentationToModel;
import org.keycloak.provider.ProviderConfigProperty;
@ -186,7 +187,8 @@ public class AuthenticationManagementResource {
List<AuthenticationFlowRepresentation> flows = new LinkedList<>();
for (AuthenticationFlowModel flow : realm.getAuthenticationFlows()) {
if (flow.isTopLevel()) {
// KEYCLOAK-3517, we need a better way to filter non-configurable internal flows
if (flow.isTopLevel() && !flow.getAlias().equals(DefaultAuthenticationFlows.SAML_ECP_FLOW)) {
flows.add(ModelToRepresentation.toRepresentation(realm, flow));
}
}