diff --git a/core/src/main/java/org/keycloak/representations/idm/AbstractAuthenticationExecutionRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/AbstractAuthenticationExecutionRepresentation.java
new file mode 100644
index 0000000000..8cd4f285b5
--- /dev/null
+++ b/core/src/main/java/org/keycloak/representations/idm/AbstractAuthenticationExecutionRepresentation.java
@@ -0,0 +1,77 @@
+/*
+ * Copyright 2016 Red Hat, Inc. and/or its affiliates
+ * and other contributors as indicated by the @author tags.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.keycloak.representations.idm;
+
+import java.io.Serializable;
+
+/**
+ * @author Marko Strukelj
+ */
+public class AbstractAuthenticationExecutionRepresentation implements Serializable {
+
+ private String authenticatorConfig;
+ private String authenticator;
+ private boolean authenticatorFlow;
+ private String requirement;
+ private int priority;
+
+ public String getAuthenticatorConfig() {
+ return authenticatorConfig;
+ }
+
+ public void setAuthenticatorConfig(String authenticatorConfig) {
+ this.authenticatorConfig = authenticatorConfig;
+ }
+
+ public String getAuthenticator() {
+ return authenticator;
+ }
+
+ public void setAuthenticator(String authenticator) {
+ this.authenticator = authenticator;
+ }
+
+ public String getRequirement() {
+ return requirement;
+ }
+
+ public void setRequirement(String requirement) {
+ this.requirement = requirement;
+ }
+
+ public int getPriority() {
+ return priority;
+ }
+
+ public void setPriority(int priority) {
+ this.priority = priority;
+ }
+
+ /**
+ * Is the referenced authenticator a flow?
+ *
+ * @return
+ */
+ public boolean isAutheticatorFlow() {
+ return authenticatorFlow;
+ }
+
+ public void setAutheticatorFlow(boolean autheticatorFlow) {
+ this.authenticatorFlow = autheticatorFlow;
+ }
+}
diff --git a/core/src/main/java/org/keycloak/representations/idm/AuthenticationExecutionExportRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/AuthenticationExecutionExportRepresentation.java
new file mode 100755
index 0000000000..74a8358250
--- /dev/null
+++ b/core/src/main/java/org/keycloak/representations/idm/AuthenticationExecutionExportRepresentation.java
@@ -0,0 +1,50 @@
+/*
+ * Copyright 2016 Red Hat, Inc. and/or its affiliates
+ * and other contributors as indicated by the @author tags.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.keycloak.representations.idm;
+
+/**
+* @author Bill Burke
+* @version $Revision: 1 $
+*/
+public class AuthenticationExecutionExportRepresentation extends AbstractAuthenticationExecutionRepresentation {
+
+ private String flowAlias;
+ private boolean userSetupAllowed;
+
+
+ public boolean isUserSetupAllowed() {
+ return userSetupAllowed;
+ }
+
+ public void setUserSetupAllowed(boolean userSetupAllowed) {
+ this.userSetupAllowed = userSetupAllowed;
+ }
+
+ /**
+ * If this execution is a flow, this is the flowId pointing to an AuthenticationFlowModel
+ *
+ * @return
+ */
+ public String getFlowAlias() {
+ return flowAlias;
+ }
+
+ public void setFlowAlias(String flowId) {
+ this.flowAlias = flowId;
+ }
+}
diff --git a/core/src/main/java/org/keycloak/representations/idm/AuthenticationExecutionInfoRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/AuthenticationExecutionInfoRepresentation.java
new file mode 100755
index 0000000000..1ff76a6465
--- /dev/null
+++ b/core/src/main/java/org/keycloak/representations/idm/AuthenticationExecutionInfoRepresentation.java
@@ -0,0 +1,128 @@
+/*
+ * Copyright 2016 Red Hat, Inc. and/or its affiliates
+ * and other contributors as indicated by the @author tags.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.keycloak.representations.idm;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+* @author Bill Burke
+* @version $Revision: 1 $
+*/
+public class AuthenticationExecutionInfoRepresentation implements Serializable {
+
+ protected String id;
+ protected String requirement;
+ protected String displayName;
+ protected List requirementChoices;
+ protected Boolean configurable;
+ protected Boolean authenticationFlow;
+ protected String providerId;
+ protected String authenticationConfig;
+ protected String flowId;
+ protected int level;
+ protected int index;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String execution) {
+ this.id = execution;
+ }
+
+ public String getDisplayName() {
+ return displayName;
+ }
+
+ public void setDisplayName(String displayName) {
+ this.displayName = displayName;
+ }
+
+ public String getRequirement() {
+ return requirement;
+ }
+
+ public void setRequirement(String requirement) {
+ this.requirement = requirement;
+ }
+
+ public List getRequirementChoices() {
+ return requirementChoices;
+ }
+
+ public void setRequirementChoices(List requirementChoices) {
+ this.requirementChoices = requirementChoices;
+ }
+
+ public Boolean getConfigurable() {
+ return configurable;
+ }
+
+ public void setConfigurable(Boolean configurable) {
+ this.configurable = configurable;
+ }
+
+ public String getProviderId() {
+ return providerId;
+ }
+
+ public void setProviderId(String providerId) {
+ this.providerId = providerId;
+ }
+
+ public String getAuthenticationConfig() {
+ return authenticationConfig;
+ }
+
+ public void setAuthenticationConfig(String authenticationConfig) {
+ this.authenticationConfig = authenticationConfig;
+ }
+
+ public Boolean getAuthenticationFlow() {
+ return authenticationFlow;
+ }
+
+ public void setAuthenticationFlow(Boolean authenticationFlow) {
+ this.authenticationFlow = authenticationFlow;
+ }
+
+ public int getLevel() {
+ return level;
+ }
+
+ public void setLevel(int level) {
+ this.level = level;
+ }
+
+ public int getIndex() {
+ return index;
+ }
+
+ public void setIndex(int index) {
+ this.index = index;
+ }
+
+ public String getFlowId() {
+ return flowId;
+ }
+
+ public void setFlowId(String flowId) {
+ this.flowId = flowId;
+ }
+}
diff --git a/core/src/main/java/org/keycloak/representations/idm/AuthenticationExecutionRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/AuthenticationExecutionRepresentation.java
old mode 100755
new mode 100644
index 7b5ee7655f..532166c291
--- a/core/src/main/java/org/keycloak/representations/idm/AuthenticationExecutionRepresentation.java
+++ b/core/src/main/java/org/keycloak/representations/idm/AuthenticationExecutionRepresentation.java
@@ -17,87 +17,36 @@
package org.keycloak.representations.idm;
-import java.io.Serializable;
-import java.util.Comparator;
-
/**
-* @author Bill Burke
-* @version $Revision: 1 $
-*/
-public class AuthenticationExecutionRepresentation implements Serializable {
+ * @author Marko Strukelj
+ */
+public class AuthenticationExecutionRepresentation extends AbstractAuthenticationExecutionRepresentation {
- private String authenticatorConfig;
- private String authenticator;
- private String flowAlias;
- private boolean autheticatorFlow;
- private String requirement;
- private boolean userSetupAllowed;
- private int priority;
+ private String id;
+ private String flowId;
+ private String parentFlow;
- public String getAuthenticatorConfig() {
- return authenticatorConfig;
+ public String getId() {
+ return id;
}
- public void setAuthenticatorConfig(String authenticatorConfig) {
- this.authenticatorConfig = authenticatorConfig;
+ public void setId(String id) {
+ this.id = id;
}
- public String getAuthenticator() {
- return authenticator;
+ public String getFlowId() {
+ return flowId;
}
- public void setAuthenticator(String authenticator) {
- this.authenticator = authenticator;
+ public void setFlowId(String flowId) {
+ this.flowId = flowId;
}
- public String getRequirement() {
- return requirement;
+ public String getParentFlow() {
+ return parentFlow;
}
- public void setRequirement(String requirement) {
- this.requirement = requirement;
+ public void setParentFlow(String parentFlow) {
+ this.parentFlow = parentFlow;
}
-
- public int getPriority() {
- return priority;
- }
-
- public void setPriority(int priority) {
- this.priority = priority;
- }
-
- public boolean isUserSetupAllowed() {
- return userSetupAllowed;
- }
-
- public void setUserSetupAllowed(boolean userSetupAllowed) {
- this.userSetupAllowed = userSetupAllowed;
- }
-
- /**
- * If this execution is a flow, this is the flowId pointing to an AuthenticationFlowModel
- *
- * @return
- */
- public String getFlowAlias() {
- return flowAlias;
- }
-
- public void setFlowAlias(String flowId) {
- this.flowAlias = flowId;
- }
-
- /**
- * Is the referenced authenticator a flow?
- *
- * @return
- */
- public boolean isAutheticatorFlow() {
- return autheticatorFlow;
- }
-
- public void setAutheticatorFlow(boolean autheticatorFlow) {
- this.autheticatorFlow = autheticatorFlow;
- }
-
}
diff --git a/core/src/main/java/org/keycloak/representations/idm/AuthenticationFlowRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/AuthenticationFlowRepresentation.java
index 0e7e4fb8cb..ee58fc4b7b 100755
--- a/core/src/main/java/org/keycloak/representations/idm/AuthenticationFlowRepresentation.java
+++ b/core/src/main/java/org/keycloak/representations/idm/AuthenticationFlowRepresentation.java
@@ -26,12 +26,21 @@ import java.util.List;
*/
public class AuthenticationFlowRepresentation implements Serializable {
+ private String id;
private String alias;
private String description;
private String providerId;
private boolean topLevel;
private boolean builtIn;
- protected List authenticationExecutions;
+ protected List authenticationExecutions;
+
+ public String getId() {
+ return id;
+ }
+
+ public void setId(String id) {
+ this.id = id;
+ }
public String getAlias() {
return alias;
@@ -73,11 +82,11 @@ public class AuthenticationFlowRepresentation implements Serializable {
this.builtIn = builtIn;
}
- public List getAuthenticationExecutions() {
+ public List getAuthenticationExecutions() {
return authenticationExecutions;
}
- public void setAuthenticationExecutions(List authenticationExecutions) {
+ public void setAuthenticationExecutions(List authenticationExecutions) {
this.authenticationExecutions = authenticationExecutions;
}
}
diff --git a/core/src/main/java/org/keycloak/representations/idm/AuthenticatorConfigInfoRepresentation.java b/core/src/main/java/org/keycloak/representations/idm/AuthenticatorConfigInfoRepresentation.java
new file mode 100644
index 0000000000..a26998b214
--- /dev/null
+++ b/core/src/main/java/org/keycloak/representations/idm/AuthenticatorConfigInfoRepresentation.java
@@ -0,0 +1,65 @@
+/*
+ * Copyright 2016 Red Hat, Inc. and/or its affiliates
+ * and other contributors as indicated by the @author tags.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.keycloak.representations.idm;
+
+import java.util.List;
+
+/**
+ * @author Marko Strukelj
+ */
+public class AuthenticatorConfigInfoRepresentation {
+
+ protected String name;
+ protected String providerId;
+ protected String helpText;
+
+ protected List properties;
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(String name) {
+ this.name = name;
+ }
+
+ public String getHelpText() {
+ return helpText;
+ }
+
+ public String getProviderId() {
+ return providerId;
+ }
+
+ public void setProviderId(String providerId) {
+ this.providerId = providerId;
+ }
+
+ public void setHelpText(String helpText) {
+ this.helpText = helpText;
+ }
+
+ public List getProperties() {
+ return properties;
+ }
+
+ public void setProperties(List properties) {
+ this.properties = properties;
+ }
+}
+
diff --git a/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/AuthenticationManagementResource.java b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/AuthenticationManagementResource.java
new file mode 100644
index 0000000000..197aeb69d9
--- /dev/null
+++ b/integration/admin-client/src/main/java/org/keycloak/admin/client/resource/AuthenticationManagementResource.java
@@ -0,0 +1,194 @@
+/*
+ * Copyright 2016 Red Hat, Inc. and/or its affiliates
+ * and other contributors as indicated by the @author tags.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.keycloak.admin.client.resource;
+
+import org.keycloak.representations.idm.AuthenticationExecutionInfoRepresentation;
+import org.keycloak.representations.idm.AuthenticationExecutionRepresentation;
+import org.keycloak.representations.idm.AuthenticationFlowRepresentation;
+import org.keycloak.representations.idm.AuthenticatorConfigInfoRepresentation;
+import org.keycloak.representations.idm.AuthenticatorConfigRepresentation;
+import org.keycloak.representations.idm.ConfigPropertyRepresentation;
+import org.keycloak.representations.idm.RequiredActionProviderRepresentation;
+
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * @author Marko Strukelj
+ */
+public interface AuthenticationManagementResource {
+
+ @GET
+ @Path("/form-providers")
+ @Produces(MediaType.APPLICATION_JSON)
+ List