KEYCLOAK-1930

This commit is contained in:
Stian Thorgersen 2015-10-14 09:31:19 +02:00
parent 6aa029784a
commit 3381ed50d1

View file

@ -22,6 +22,7 @@ import org.keycloak.models.RequiredActionProviderModel;
import org.keycloak.provider.ProviderConfigProperty;
import org.keycloak.provider.ProviderFactory;
import org.keycloak.representations.idm.ConfigPropertyRepresentation;
import org.keycloak.services.ErrorResponse;
import org.keycloak.utils.CredentialHelper;
import javax.ws.rs.Consumes;
@ -277,7 +278,7 @@ public class AuthenticationManagementResource {
this.auth.requireManage();
if (realm.getFlowByAlias(model.getAlias()) != null) {
return Response.status(Response.Status.CONFLICT).build();
return ErrorResponse.exists("Flow " + model.getAlias() + " already exists");
}
realm.addAuthenticationFlow(model);