diff --git a/dependencies/server-min/pom.xml b/dependencies/server-min/pom.xml
index a25e991747..5e4f9b5db8 100755
--- a/dependencies/server-min/pom.xml
+++ b/dependencies/server-min/pom.xml
@@ -73,26 +73,14 @@
org.keycloak
keycloak-forms-common-themes
-
- org.keycloak
- keycloak-account-api
-
org.keycloak
keycloak-account-freemarker
-
- org.keycloak
- keycloak-email-api
-
org.keycloak
keycloak-email-freemarker
-
- org.keycloak
- keycloak-login-api
-
org.keycloak
keycloak-login-freemarker
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-account-api/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-account-api/main/module.xml
deleted file mode 100755
index 8936ceb0ac..0000000000
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-account-api/main/module.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-account-freemarker/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-account-freemarker/main/module.xml
index 057243c354..ab7d2608df 100755
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-account-freemarker/main/module.xml
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-account-freemarker/main/module.xml
@@ -8,7 +8,6 @@
-
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-email-api/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-email-api/main/module.xml
deleted file mode 100755
index 3fc237a7fe..0000000000
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-email-api/main/module.xml
+++ /dev/null
@@ -1,17 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-email-freemarker/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-email-freemarker/main/module.xml
index 80b497ed9d..324e131755 100755
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-email-freemarker/main/module.xml
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-email-freemarker/main/module.xml
@@ -8,7 +8,6 @@
-
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-events-email/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-events-email/main/module.xml
index 8642b91e56..082c8fbc2d 100755
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-events-email/main/module.xml
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-events-email/main/module.xml
@@ -10,7 +10,6 @@
-
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-login-api/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-login-api/main/module.xml
deleted file mode 100755
index bb5c7d0fb8..0000000000
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-login-api/main/module.xml
+++ /dev/null
@@ -1,18 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-login-freemarker/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-login-freemarker/main/module.xml
index 97ea41003d..e25a46abe6 100755
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-login-freemarker/main/module.xml
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-login-freemarker/main/module.xml
@@ -8,8 +8,6 @@
-
-
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-saml-protocol/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-saml-protocol/main/module.xml
index 0dd7036a2b..f9b6ad766c 100755
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-saml-protocol/main/module.xml
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-saml-protocol/main/module.xml
@@ -11,9 +11,6 @@
-
-
-
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml
index 11022ecc63..0086c22027 100755
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-server-subsystem/main/server-war/WEB-INF/jboss-deployment-structure.xml
@@ -1,7 +1,6 @@
-
@@ -11,7 +10,6 @@
-
@@ -24,7 +22,6 @@
-
diff --git a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-services/main/module.xml b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-services/main/module.xml
index 4c3ab595fc..8c2e2a8024 100755
--- a/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-services/main/module.xml
+++ b/distribution/feature-packs/server-feature-pack/src/main/resources/modules/system/layers/base/org/keycloak/keycloak-services/main/module.xml
@@ -7,7 +7,6 @@
-
@@ -20,7 +19,6 @@
-
@@ -33,7 +31,6 @@
-
diff --git a/events/email/pom.xml b/events/email/pom.xml
index 7e15467501..6769ae3972 100755
--- a/events/email/pom.xml
+++ b/events/email/pom.xml
@@ -23,11 +23,6 @@
keycloak-server-spi
provided
-
- org.keycloak
- keycloak-email-api
- provided
-
org.jboss.logging
jboss-logging
diff --git a/examples/providers/authenticator/pom.xml b/examples/providers/authenticator/pom.xml
index 2886647388..e3b8e4a74a 100755
--- a/examples/providers/authenticator/pom.xml
+++ b/examples/providers/authenticator/pom.xml
@@ -34,11 +34,6 @@
keycloak-services
provided
-
- org.keycloak
- keycloak-login-api
- provided
-
diff --git a/forms/account-api/pom.xml b/forms/account-api/pom.xml
deleted file mode 100755
index 0976fb1464..0000000000
--- a/forms/account-api/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
- keycloak-forms-parent
- org.keycloak
- 1.9.0.CR1-SNAPSHOT
- ../pom.xml
-
- 4.0.0
-
- keycloak-account-api
- Keycloak Account Management API
-
-
-
-
- org.keycloak
- keycloak-core
- provided
-
-
- org.keycloak
- keycloak-server-spi
- provided
-
-
- org.jboss.spec.javax.ws.rs
- jboss-jaxrs-api_2.0_spec
- provided
-
-
- org.jboss.resteasy
- resteasy-jaxrs
- provided
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- ${maven.compiler.target}
-
-
-
-
-
-
diff --git a/forms/account-api/src/main/resources/META-INF/services/org.keycloak.provider.Spi b/forms/account-api/src/main/resources/META-INF/services/org.keycloak.provider.Spi
deleted file mode 100644
index 8ab9e170c0..0000000000
--- a/forms/account-api/src/main/resources/META-INF/services/org.keycloak.provider.Spi
+++ /dev/null
@@ -1 +0,0 @@
-org.keycloak.account.AccountSpi
\ No newline at end of file
diff --git a/forms/account-freemarker/pom.xml b/forms/account-freemarker/pom.xml
index a5e937273c..1b2ccd9aa2 100755
--- a/forms/account-freemarker/pom.xml
+++ b/forms/account-freemarker/pom.xml
@@ -19,11 +19,6 @@
keycloak-core
provided
-
- org.keycloak
- keycloak-account-api
- provided
-
org.keycloak
keycloak-server-spi
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProvider.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/FreeMarkerAccountProvider.java
similarity index 92%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProvider.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/FreeMarkerAccountProvider.java
index b285df628d..8cc9de6869 100755
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProvider.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/FreeMarkerAccountProvider.java
@@ -14,7 +14,7 @@
* License for the specific language governing permissions and limitations under
* the License.
*/
-package org.keycloak.account.freemarker;
+package org.keycloak.forms.account.freemarker;
import java.io.IOException;
import java.net.URI;
@@ -34,19 +34,19 @@ import javax.ws.rs.core.UriBuilder;
import javax.ws.rs.core.UriInfo;
import org.jboss.logging.Logger;
-import org.keycloak.account.AccountPages;
-import org.keycloak.account.AccountProvider;
-import org.keycloak.account.freemarker.model.ApplicationsBean;
-import org.keycloak.account.freemarker.model.AccountBean;
-import org.keycloak.account.freemarker.model.AccountFederatedIdentityBean;
-import org.keycloak.account.freemarker.model.FeaturesBean;
-import org.keycloak.account.freemarker.model.LogBean;
-import org.keycloak.account.freemarker.model.PasswordBean;
-import org.keycloak.account.freemarker.model.RealmBean;
-import org.keycloak.account.freemarker.model.ReferrerBean;
-import org.keycloak.account.freemarker.model.SessionsBean;
-import org.keycloak.account.freemarker.model.TotpBean;
-import org.keycloak.account.freemarker.model.UrlBean;
+import org.keycloak.forms.account.AccountPages;
+import org.keycloak.forms.account.AccountProvider;
+import org.keycloak.forms.account.freemarker.model.ApplicationsBean;
+import org.keycloak.forms.account.freemarker.model.AccountBean;
+import org.keycloak.forms.account.freemarker.model.AccountFederatedIdentityBean;
+import org.keycloak.forms.account.freemarker.model.FeaturesBean;
+import org.keycloak.forms.account.freemarker.model.LogBean;
+import org.keycloak.forms.account.freemarker.model.PasswordBean;
+import org.keycloak.forms.account.freemarker.model.RealmBean;
+import org.keycloak.forms.account.freemarker.model.ReferrerBean;
+import org.keycloak.forms.account.freemarker.model.SessionsBean;
+import org.keycloak.forms.account.freemarker.model.TotpBean;
+import org.keycloak.forms.account.freemarker.model.UrlBean;
import org.keycloak.events.Event;
import org.keycloak.freemarker.BrowserSecurityHeaderSetup;
import org.keycloak.freemarker.FreeMarkerException;
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProviderFactory.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/FreeMarkerAccountProviderFactory.java
similarity index 84%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProviderFactory.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/FreeMarkerAccountProviderFactory.java
index 0b0da3c520..df4e3cb68a 100755
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/FreeMarkerAccountProviderFactory.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/FreeMarkerAccountProviderFactory.java
@@ -1,8 +1,8 @@
-package org.keycloak.account.freemarker;
+package org.keycloak.forms.account.freemarker;
import org.keycloak.Config;
-import org.keycloak.account.AccountProvider;
-import org.keycloak.account.AccountProviderFactory;
+import org.keycloak.forms.account.AccountProvider;
+import org.keycloak.forms.account.AccountProviderFactory;
import org.keycloak.freemarker.FreeMarkerUtil;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/Templates.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/Templates.java
old mode 100644
new mode 100755
similarity index 88%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/Templates.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/Templates.java
index d3116f647d..e3cfe66a5a
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/Templates.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/Templates.java
@@ -1,6 +1,6 @@
-package org.keycloak.account.freemarker;
+package org.keycloak.forms.account.freemarker;
-import org.keycloak.account.AccountPages;
+import org.keycloak.forms.account.AccountPages;
/**
* @author Stian Thorgersen
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccountBean.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/AccountBean.java
similarity index 97%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccountBean.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/AccountBean.java
index fe8c83d17e..9e4ae6443a 100755
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccountBean.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/AccountBean.java
@@ -1,4 +1,4 @@
-package org.keycloak.account.freemarker.model;
+package org.keycloak.forms.account.freemarker.model;
import org.jboss.logging.Logger;
import org.keycloak.models.UserModel;
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccountFederatedIdentityBean.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/AccountFederatedIdentityBean.java
similarity index 99%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccountFederatedIdentityBean.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/AccountFederatedIdentityBean.java
index 1f0290d80e..8bbf197e40 100755
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/AccountFederatedIdentityBean.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/AccountFederatedIdentityBean.java
@@ -1,4 +1,4 @@
-package org.keycloak.account.freemarker.model;
+package org.keycloak.forms.account.freemarker.model;
import org.keycloak.models.FederatedIdentityModel;
import org.keycloak.models.IdentityProviderModel;
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/ApplicationsBean.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/ApplicationsBean.java
old mode 100644
new mode 100755
similarity index 99%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/ApplicationsBean.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/ApplicationsBean.java
index cf38357a22..bc5e837e19
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/ApplicationsBean.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/ApplicationsBean.java
@@ -1,4 +1,4 @@
-package org.keycloak.account.freemarker.model;
+package org.keycloak.forms.account.freemarker.model;
import java.util.ArrayList;
import java.util.LinkedList;
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/FeaturesBean.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/FeaturesBean.java
old mode 100644
new mode 100755
similarity index 93%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/FeaturesBean.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/FeaturesBean.java
index b3b96d6388..9e98616ac2
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/FeaturesBean.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/FeaturesBean.java
@@ -1,4 +1,4 @@
-package org.keycloak.account.freemarker.model;
+package org.keycloak.forms.account.freemarker.model;
/**
* @author Stian Thorgersen
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/LogBean.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/LogBean.java
old mode 100644
new mode 100755
similarity index 97%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/LogBean.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/LogBean.java
index 76fc8572f5..55038b3d4f
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/LogBean.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/LogBean.java
@@ -1,4 +1,4 @@
-package org.keycloak.account.freemarker.model;
+package org.keycloak.forms.account.freemarker.model;
import org.keycloak.events.Event;
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/PasswordBean.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/PasswordBean.java
old mode 100644
new mode 100755
similarity index 85%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/PasswordBean.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/PasswordBean.java
index 2e2c3bdb47..f2c1ea6f6a
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/PasswordBean.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/PasswordBean.java
@@ -1,4 +1,4 @@
-package org.keycloak.account.freemarker.model;
+package org.keycloak.forms.account.freemarker.model;
/**
* @author Stian Thorgersen
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/RealmBean.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/RealmBean.java
similarity index 96%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/RealmBean.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/RealmBean.java
index fa04db0168..68c7b78943 100755
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/RealmBean.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/RealmBean.java
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.keycloak.account.freemarker.model;
+package org.keycloak.forms.account.freemarker.model;
import org.keycloak.models.RealmModel;
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/ReferrerBean.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/ReferrerBean.java
old mode 100644
new mode 100755
similarity index 87%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/ReferrerBean.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/ReferrerBean.java
index 0734a7bfc7..7835f82ba9
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/ReferrerBean.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/ReferrerBean.java
@@ -1,4 +1,4 @@
-package org.keycloak.account.freemarker.model;
+package org.keycloak.forms.account.freemarker.model;
/**
* @author Stian Thorgersen
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/SessionsBean.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/SessionsBean.java
similarity index 97%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/SessionsBean.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/SessionsBean.java
index 78aabd4171..8a54964439 100755
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/SessionsBean.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/SessionsBean.java
@@ -1,4 +1,4 @@
-package org.keycloak.account.freemarker.model;
+package org.keycloak.forms.account.freemarker.model;
import org.keycloak.models.ClientModel;
import org.keycloak.models.ClientSessionModel;
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/TotpBean.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/TotpBean.java
similarity index 98%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/TotpBean.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/TotpBean.java
index 11363fa05b..e2e48d1d51 100755
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/TotpBean.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/TotpBean.java
@@ -19,7 +19,7 @@
* Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
* 02110-1301 USA, or see the FSF site: http://www.fsf.org.
*/
-package org.keycloak.account.freemarker.model;
+package org.keycloak.forms.account.freemarker.model;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
diff --git a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/UrlBean.java b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/UrlBean.java
similarity index 97%
rename from forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/UrlBean.java
rename to forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/UrlBean.java
index 0de3a9af7a..c7be98274a 100755
--- a/forms/account-freemarker/src/main/java/org/keycloak/account/freemarker/model/UrlBean.java
+++ b/forms/account-freemarker/src/main/java/org/keycloak/forms/account/freemarker/model/UrlBean.java
@@ -1,4 +1,4 @@
-package org.keycloak.account.freemarker.model;
+package org.keycloak.forms.account.freemarker.model;
import org.keycloak.freemarker.Theme;
import org.keycloak.models.RealmModel;
diff --git a/forms/account-freemarker/src/main/resources/META-INF/services/org.keycloak.account.AccountProviderFactory b/forms/account-freemarker/src/main/resources/META-INF/services/org.keycloak.account.AccountProviderFactory
deleted file mode 100644
index fd99df60c6..0000000000
--- a/forms/account-freemarker/src/main/resources/META-INF/services/org.keycloak.account.AccountProviderFactory
+++ /dev/null
@@ -1 +0,0 @@
-org.keycloak.account.freemarker.FreeMarkerAccountProviderFactory
\ No newline at end of file
diff --git a/forms/account-freemarker/src/main/resources/META-INF/services/org.keycloak.forms.account.AccountProviderFactory b/forms/account-freemarker/src/main/resources/META-INF/services/org.keycloak.forms.account.AccountProviderFactory
new file mode 100755
index 0000000000..71471d1082
--- /dev/null
+++ b/forms/account-freemarker/src/main/resources/META-INF/services/org.keycloak.forms.account.AccountProviderFactory
@@ -0,0 +1 @@
+org.keycloak.forms.account.freemarker.FreeMarkerAccountProviderFactory
\ No newline at end of file
diff --git a/forms/email-api/pom.xml b/forms/email-api/pom.xml
deleted file mode 100755
index 6fdeeeb041..0000000000
--- a/forms/email-api/pom.xml
+++ /dev/null
@@ -1,42 +0,0 @@
-
-
-
- keycloak-forms-parent
- org.keycloak
- 1.9.0.CR1-SNAPSHOT
- ../pom.xml
-
- 4.0.0
-
- keycloak-email-api
- Keycloak Email API
-
-
-
-
- org.keycloak
- keycloak-core
- provided
-
-
- org.keycloak
- keycloak-server-spi
- provided
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- ${maven.compiler.target}
-
-
-
-
-
-
diff --git a/forms/email-api/src/main/resources/META-INF/services/org.keycloak.provider.Spi b/forms/email-api/src/main/resources/META-INF/services/org.keycloak.provider.Spi
deleted file mode 100644
index 80967a250e..0000000000
--- a/forms/email-api/src/main/resources/META-INF/services/org.keycloak.provider.Spi
+++ /dev/null
@@ -1,2 +0,0 @@
-org.keycloak.email.EmailSenderSpi
-org.keycloak.email.EmailTemplateSpi
\ No newline at end of file
diff --git a/forms/email-freemarker/pom.xml b/forms/email-freemarker/pom.xml
index fbbdc6cddf..8d533cd51d 100755
--- a/forms/email-freemarker/pom.xml
+++ b/forms/email-freemarker/pom.xml
@@ -19,11 +19,6 @@
keycloak-core
provided
-
- org.keycloak
- keycloak-email-api
- provided
-
org.keycloak
keycloak-server-spi
diff --git a/forms/login-api/pom.xml b/forms/login-api/pom.xml
deleted file mode 100755
index ed91ed3009..0000000000
--- a/forms/login-api/pom.xml
+++ /dev/null
@@ -1,52 +0,0 @@
-
-
-
- keycloak-forms-parent
- org.keycloak
- 1.9.0.CR1-SNAPSHOT
- ../pom.xml
-
- 4.0.0
-
- keycloak-login-api
- Keycloak Login API
-
-
-
-
- org.keycloak
- keycloak-core
- provided
-
-
- org.keycloak
- keycloak-server-spi
- provided
-
-
- org.jboss.spec.javax.ws.rs
- jboss-jaxrs-api_2.0_spec
- provided
-
-
- org.jboss.resteasy
- resteasy-jaxrs
- provided
-
-
-
-
-
-
- org.apache.maven.plugins
- maven-compiler-plugin
-
-
- ${maven.compiler.target}
-
-
-
-
-
-
diff --git a/forms/login-api/src/main/resources/META-INF/services/org.keycloak.provider.Spi b/forms/login-api/src/main/resources/META-INF/services/org.keycloak.provider.Spi
deleted file mode 100644
index afbdfbf299..0000000000
--- a/forms/login-api/src/main/resources/META-INF/services/org.keycloak.provider.Spi
+++ /dev/null
@@ -1 +0,0 @@
-org.keycloak.login.LoginFormsSpi
\ No newline at end of file
diff --git a/forms/login-freemarker/pom.xml b/forms/login-freemarker/pom.xml
index cfb77270d4..b3800608de 100755
--- a/forms/login-freemarker/pom.xml
+++ b/forms/login-freemarker/pom.xml
@@ -24,16 +24,6 @@
keycloak-forms-common-freemarker
provided
-
- org.keycloak
- keycloak-login-api
- provided
-
-
- org.keycloak
- keycloak-email-api
- provided
-
org.keycloak
keycloak-server-spi
diff --git a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/FreeMarkerLoginFormsProvider.java b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/FreeMarkerLoginFormsProvider.java
index 1cbd32830b..6a0c06a833 100755
--- a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/FreeMarkerLoginFormsProvider.java
+++ b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/FreeMarkerLoginFormsProvider.java
@@ -36,8 +36,8 @@ import org.keycloak.freemarker.beans.MessageBean;
import org.keycloak.freemarker.beans.MessageFormatterMethod;
import org.keycloak.freemarker.beans.MessageType;
import org.keycloak.freemarker.beans.MessagesPerFieldBean;
-import org.keycloak.login.LoginFormsPages;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsPages;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.login.freemarker.model.ClientBean;
import org.keycloak.login.freemarker.model.CodeBean;
import org.keycloak.login.freemarker.model.IdentityProviderBean;
diff --git a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/FreeMarkerLoginFormsProviderFactory.java b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/FreeMarkerLoginFormsProviderFactory.java
index 2452b7a2f4..b1d2a93c7d 100755
--- a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/FreeMarkerLoginFormsProviderFactory.java
+++ b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/FreeMarkerLoginFormsProviderFactory.java
@@ -2,8 +2,8 @@ package org.keycloak.login.freemarker;
import org.keycloak.Config;
import org.keycloak.freemarker.FreeMarkerUtil;
-import org.keycloak.login.LoginFormsProvider;
-import org.keycloak.login.LoginFormsProviderFactory;
+import org.keycloak.forms.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProviderFactory;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
diff --git a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/LoginFormsUtil.java b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/LoginFormsUtil.java
old mode 100644
new mode 100755
index bbcf1c0736..8e979e2588
--- a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/LoginFormsUtil.java
+++ b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/LoginFormsUtil.java
@@ -8,7 +8,7 @@ import java.util.Set;
import javax.ws.rs.core.MultivaluedMap;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.FederatedIdentityModel;
import org.keycloak.models.IdentityProviderModel;
import org.keycloak.models.KeycloakSession;
diff --git a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/Templates.java b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/Templates.java
old mode 100644
new mode 100755
index e63f49f088..92812e1df2
--- a/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/Templates.java
+++ b/forms/login-freemarker/src/main/java/org/keycloak/login/freemarker/Templates.java
@@ -1,6 +1,6 @@
package org.keycloak.login.freemarker;
-import org.keycloak.login.LoginFormsPages;
+import org.keycloak.forms.login.LoginFormsPages;
/**
* @author Stian Thorgersen
diff --git a/forms/login-freemarker/src/main/resources/META-INF/services/org.keycloak.login.LoginFormsProviderFactory b/forms/login-freemarker/src/main/resources/META-INF/services/org.keycloak.forms.login.LoginFormsProviderFactory
similarity index 100%
rename from forms/login-freemarker/src/main/resources/META-INF/services/org.keycloak.login.LoginFormsProviderFactory
rename to forms/login-freemarker/src/main/resources/META-INF/services/org.keycloak.forms.login.LoginFormsProviderFactory
diff --git a/forms/pom.xml b/forms/pom.xml
index 94f0adfe63..0a1227c077 100755
--- a/forms/pom.xml
+++ b/forms/pom.xml
@@ -17,11 +17,8 @@
common-freemarker
common-themes
- account-api
account-freemarker
- email-api
email-freemarker
- login-api
login-freemarker
diff --git a/pom.xml b/pom.xml
index 3921d97384..e55e5274b4 100755
--- a/pom.xml
+++ b/pom.xml
@@ -705,11 +705,6 @@
keycloak-ldap-federation
${project.version}
-
- org.keycloak
- keycloak-account-api
- ${project.version}
-
org.keycloak
keycloak-account-freemarker
@@ -737,11 +732,6 @@
keycloak-forms-common-themes
${project.version}
-
- org.keycloak
- keycloak-email-api
- ${project.version}
-
org.keycloak
keycloak-email-freemarker
@@ -947,11 +937,6 @@
keycloak-wildfly-extensions
${project.version}
-
- org.keycloak
- keycloak-login-api
- ${project.version}
-
org.keycloak
keycloak-login-freemarker
diff --git a/saml/saml-protocol/pom.xml b/saml/saml-protocol/pom.xml
index 67b5457d7e..73cd7ca126 100755
--- a/saml/saml-protocol/pom.xml
+++ b/saml/saml-protocol/pom.xml
@@ -48,21 +48,6 @@
keycloak-forms-common-freemarker
provided
-
- org.keycloak
- keycloak-account-api
- provided
-
-
- org.keycloak
- keycloak-email-api
- provided
-
-
- org.keycloak
- keycloak-login-api
- provided
-
org.keycloak
keycloak-server-spi
diff --git a/forms/email-api/src/main/java/org/keycloak/email/EmailException.java b/server-spi/src/main/java/org/keycloak/email/EmailException.java
similarity index 100%
rename from forms/email-api/src/main/java/org/keycloak/email/EmailException.java
rename to server-spi/src/main/java/org/keycloak/email/EmailException.java
diff --git a/forms/email-api/src/main/java/org/keycloak/email/EmailSenderProvider.java b/server-spi/src/main/java/org/keycloak/email/EmailSenderProvider.java
similarity index 100%
rename from forms/email-api/src/main/java/org/keycloak/email/EmailSenderProvider.java
rename to server-spi/src/main/java/org/keycloak/email/EmailSenderProvider.java
diff --git a/forms/email-api/src/main/java/org/keycloak/email/EmailSenderProviderFactory.java b/server-spi/src/main/java/org/keycloak/email/EmailSenderProviderFactory.java
similarity index 100%
rename from forms/email-api/src/main/java/org/keycloak/email/EmailSenderProviderFactory.java
rename to server-spi/src/main/java/org/keycloak/email/EmailSenderProviderFactory.java
diff --git a/forms/email-api/src/main/java/org/keycloak/email/EmailSenderSpi.java b/server-spi/src/main/java/org/keycloak/email/EmailSenderSpi.java
similarity index 100%
rename from forms/email-api/src/main/java/org/keycloak/email/EmailSenderSpi.java
rename to server-spi/src/main/java/org/keycloak/email/EmailSenderSpi.java
diff --git a/forms/email-api/src/main/java/org/keycloak/email/EmailTemplateProvider.java b/server-spi/src/main/java/org/keycloak/email/EmailTemplateProvider.java
similarity index 100%
rename from forms/email-api/src/main/java/org/keycloak/email/EmailTemplateProvider.java
rename to server-spi/src/main/java/org/keycloak/email/EmailTemplateProvider.java
diff --git a/forms/email-api/src/main/java/org/keycloak/email/EmailTemplateProviderFactory.java b/server-spi/src/main/java/org/keycloak/email/EmailTemplateProviderFactory.java
similarity index 100%
rename from forms/email-api/src/main/java/org/keycloak/email/EmailTemplateProviderFactory.java
rename to server-spi/src/main/java/org/keycloak/email/EmailTemplateProviderFactory.java
diff --git a/forms/email-api/src/main/java/org/keycloak/email/EmailTemplateSpi.java b/server-spi/src/main/java/org/keycloak/email/EmailTemplateSpi.java
similarity index 100%
rename from forms/email-api/src/main/java/org/keycloak/email/EmailTemplateSpi.java
rename to server-spi/src/main/java/org/keycloak/email/EmailTemplateSpi.java
diff --git a/forms/account-api/src/main/java/org/keycloak/account/AccountPages.java b/server-spi/src/main/java/org/keycloak/forms/account/AccountPages.java
old mode 100644
new mode 100755
similarity index 83%
rename from forms/account-api/src/main/java/org/keycloak/account/AccountPages.java
rename to server-spi/src/main/java/org/keycloak/forms/account/AccountPages.java
index 257fc8434e..53c76826de
--- a/forms/account-api/src/main/java/org/keycloak/account/AccountPages.java
+++ b/server-spi/src/main/java/org/keycloak/forms/account/AccountPages.java
@@ -1,4 +1,4 @@
-package org.keycloak.account;
+package org.keycloak.forms.account;
/**
* @author Stian Thorgersen
diff --git a/forms/account-api/src/main/java/org/keycloak/account/AccountProvider.java b/server-spi/src/main/java/org/keycloak/forms/account/AccountProvider.java
similarity index 97%
rename from forms/account-api/src/main/java/org/keycloak/account/AccountProvider.java
rename to server-spi/src/main/java/org/keycloak/forms/account/AccountProvider.java
index 6e5511e193..c322e2f812 100755
--- a/forms/account-api/src/main/java/org/keycloak/account/AccountProvider.java
+++ b/server-spi/src/main/java/org/keycloak/forms/account/AccountProvider.java
@@ -1,4 +1,4 @@
-package org.keycloak.account;
+package org.keycloak.forms.account;
import java.util.List;
diff --git a/forms/account-api/src/main/java/org/keycloak/account/AccountProviderFactory.java b/server-spi/src/main/java/org/keycloak/forms/account/AccountProviderFactory.java
old mode 100644
new mode 100755
similarity index 84%
rename from forms/account-api/src/main/java/org/keycloak/account/AccountProviderFactory.java
rename to server-spi/src/main/java/org/keycloak/forms/account/AccountProviderFactory.java
index a1ef25756a..f8952ad507
--- a/forms/account-api/src/main/java/org/keycloak/account/AccountProviderFactory.java
+++ b/server-spi/src/main/java/org/keycloak/forms/account/AccountProviderFactory.java
@@ -1,4 +1,4 @@
-package org.keycloak.account;
+package org.keycloak.forms.account;
import org.keycloak.provider.ProviderFactory;
diff --git a/forms/account-api/src/main/java/org/keycloak/account/AccountSpi.java b/server-spi/src/main/java/org/keycloak/forms/account/AccountSpi.java
old mode 100644
new mode 100755
similarity index 94%
rename from forms/account-api/src/main/java/org/keycloak/account/AccountSpi.java
rename to server-spi/src/main/java/org/keycloak/forms/account/AccountSpi.java
index 3d2072a652..821d0c74b2
--- a/forms/account-api/src/main/java/org/keycloak/account/AccountSpi.java
+++ b/server-spi/src/main/java/org/keycloak/forms/account/AccountSpi.java
@@ -1,4 +1,4 @@
-package org.keycloak.account;
+package org.keycloak.forms.account;
import org.keycloak.provider.Provider;
import org.keycloak.provider.ProviderFactory;
diff --git a/forms/login-api/src/main/java/org/keycloak/login/LoginFormsPages.java b/server-spi/src/main/java/org/keycloak/forms/login/LoginFormsPages.java
old mode 100644
new mode 100755
similarity index 90%
rename from forms/login-api/src/main/java/org/keycloak/login/LoginFormsPages.java
rename to server-spi/src/main/java/org/keycloak/forms/login/LoginFormsPages.java
index 9a44db4405..24c620af34
--- a/forms/login-api/src/main/java/org/keycloak/login/LoginFormsPages.java
+++ b/server-spi/src/main/java/org/keycloak/forms/login/LoginFormsPages.java
@@ -1,4 +1,4 @@
-package org.keycloak.login;
+package org.keycloak.forms.login;
/**
* @author Stian Thorgersen
diff --git a/forms/login-api/src/main/java/org/keycloak/login/LoginFormsProvider.java b/server-spi/src/main/java/org/keycloak/forms/login/LoginFormsProvider.java
similarity index 98%
rename from forms/login-api/src/main/java/org/keycloak/login/LoginFormsProvider.java
rename to server-spi/src/main/java/org/keycloak/forms/login/LoginFormsProvider.java
index ac9145d380..d0320252e1 100755
--- a/forms/login-api/src/main/java/org/keycloak/login/LoginFormsProvider.java
+++ b/server-spi/src/main/java/org/keycloak/forms/login/LoginFormsProvider.java
@@ -1,4 +1,4 @@
-package org.keycloak.login;
+package org.keycloak.forms.login;
import java.net.URI;
import java.util.List;
diff --git a/forms/login-api/src/main/java/org/keycloak/login/LoginFormsProviderFactory.java b/server-spi/src/main/java/org/keycloak/forms/login/LoginFormsProviderFactory.java
similarity index 85%
rename from forms/login-api/src/main/java/org/keycloak/login/LoginFormsProviderFactory.java
rename to server-spi/src/main/java/org/keycloak/forms/login/LoginFormsProviderFactory.java
index f4e58dfb22..f8c84e1883 100755
--- a/forms/login-api/src/main/java/org/keycloak/login/LoginFormsProviderFactory.java
+++ b/server-spi/src/main/java/org/keycloak/forms/login/LoginFormsProviderFactory.java
@@ -1,4 +1,4 @@
-package org.keycloak.login;
+package org.keycloak.forms.login;
import org.keycloak.provider.ProviderFactory;
diff --git a/forms/login-api/src/main/java/org/keycloak/login/LoginFormsSpi.java b/server-spi/src/main/java/org/keycloak/forms/login/LoginFormsSpi.java
old mode 100644
new mode 100755
similarity index 95%
rename from forms/login-api/src/main/java/org/keycloak/login/LoginFormsSpi.java
rename to server-spi/src/main/java/org/keycloak/forms/login/LoginFormsSpi.java
index dc18703b70..6abb884be2
--- a/forms/login-api/src/main/java/org/keycloak/login/LoginFormsSpi.java
+++ b/server-spi/src/main/java/org/keycloak/forms/login/LoginFormsSpi.java
@@ -1,4 +1,4 @@
-package org.keycloak.login;
+package org.keycloak.forms.login;
import org.keycloak.provider.Provider;
import org.keycloak.provider.ProviderFactory;
diff --git a/server-spi/src/main/resources/META-INF/services/org.keycloak.provider.Spi b/server-spi/src/main/resources/META-INF/services/org.keycloak.provider.Spi
index 5a4ee96ae6..653074c47e 100755
--- a/server-spi/src/main/resources/META-INF/services/org.keycloak.provider.Spi
+++ b/server-spi/src/main/resources/META-INF/services/org.keycloak.provider.Spi
@@ -18,4 +18,8 @@ org.keycloak.protocol.ProtocolMapperSpi
org.keycloak.broker.provider.IdentityProviderSpi
org.keycloak.broker.provider.IdentityProviderMapperSpi
org.keycloak.broker.social.SocialProviderSpi
+org.keycloak.forms.account.AccountSpi
+org.keycloak.forms.login.LoginFormsSpi
+org.keycloak.email.EmailSenderSpi
+org.keycloak.email.EmailTemplateSpi
diff --git a/services/pom.xml b/services/pom.xml
index c72ae849b9..915d04b0ce 100755
--- a/services/pom.xml
+++ b/services/pom.xml
@@ -38,22 +38,10 @@
org.keycloak
keycloak-forms-common-freemarker
-
- org.keycloak
- keycloak-account-api
-
-
- org.keycloak
- keycloak-email-api
-
javax.mail
mail
-
- org.keycloak
- keycloak-login-api
-
org.keycloak
keycloak-server-spi
diff --git a/services/src/main/java/org/keycloak/authentication/AuthenticationFlowContext.java b/services/src/main/java/org/keycloak/authentication/AuthenticationFlowContext.java
index 9f69e636e0..78916011be 100755
--- a/services/src/main/java/org/keycloak/authentication/AuthenticationFlowContext.java
+++ b/services/src/main/java/org/keycloak/authentication/AuthenticationFlowContext.java
@@ -1,6 +1,6 @@
package org.keycloak.authentication;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.ClientSessionModel;
import org.keycloak.models.UserModel;
import org.keycloak.models.UserSessionModel;
diff --git a/services/src/main/java/org/keycloak/authentication/AuthenticationProcessor.java b/services/src/main/java/org/keycloak/authentication/AuthenticationProcessor.java
index 7cc39f68df..7fac42b460 100755
--- a/services/src/main/java/org/keycloak/authentication/AuthenticationProcessor.java
+++ b/services/src/main/java/org/keycloak/authentication/AuthenticationProcessor.java
@@ -9,7 +9,7 @@ import org.keycloak.authentication.authenticators.client.ClientAuthUtil;
import org.keycloak.events.Details;
import org.keycloak.events.Errors;
import org.keycloak.events.EventBuilder;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.AuthenticationExecutionModel;
import org.keycloak.models.AuthenticationFlowModel;
import org.keycloak.models.AuthenticatorConfigModel;
diff --git a/services/src/main/java/org/keycloak/authentication/FormAction.java b/services/src/main/java/org/keycloak/authentication/FormAction.java
index 72a157618a..5dface9e97 100755
--- a/services/src/main/java/org/keycloak/authentication/FormAction.java
+++ b/services/src/main/java/org/keycloak/authentication/FormAction.java
@@ -1,6 +1,6 @@
package org.keycloak.authentication;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.UserModel;
diff --git a/services/src/main/java/org/keycloak/authentication/FormAuthenticationFlow.java b/services/src/main/java/org/keycloak/authentication/FormAuthenticationFlow.java
index 2913dcf920..a83f49e7b1 100755
--- a/services/src/main/java/org/keycloak/authentication/FormAuthenticationFlow.java
+++ b/services/src/main/java/org/keycloak/authentication/FormAuthenticationFlow.java
@@ -4,7 +4,7 @@ import org.jboss.resteasy.spi.HttpRequest;
import org.keycloak.common.ClientConnection;
import org.keycloak.OAuth2Constants;
import org.keycloak.events.EventBuilder;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.AuthenticationExecutionModel;
import org.keycloak.models.AuthenticatorConfigModel;
import org.keycloak.models.ClientSessionModel;
diff --git a/services/src/main/java/org/keycloak/authentication/FormAuthenticator.java b/services/src/main/java/org/keycloak/authentication/FormAuthenticator.java
index a900668aca..369b502393 100755
--- a/services/src/main/java/org/keycloak/authentication/FormAuthenticator.java
+++ b/services/src/main/java/org/keycloak/authentication/FormAuthenticator.java
@@ -1,6 +1,6 @@
package org.keycloak.authentication;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.provider.Provider;
import javax.ws.rs.core.Response;
diff --git a/services/src/main/java/org/keycloak/authentication/RequiredActionContext.java b/services/src/main/java/org/keycloak/authentication/RequiredActionContext.java
index e7439c2c8f..719bbbb009 100755
--- a/services/src/main/java/org/keycloak/authentication/RequiredActionContext.java
+++ b/services/src/main/java/org/keycloak/authentication/RequiredActionContext.java
@@ -3,7 +3,7 @@ package org.keycloak.authentication;
import org.jboss.resteasy.spi.HttpRequest;
import org.keycloak.common.ClientConnection;
import org.keycloak.events.EventBuilder;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.ClientSessionModel;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
diff --git a/services/src/main/java/org/keycloak/authentication/RequiredActionContextResult.java b/services/src/main/java/org/keycloak/authentication/RequiredActionContextResult.java
index 166a032031..42307820c8 100755
--- a/services/src/main/java/org/keycloak/authentication/RequiredActionContextResult.java
+++ b/services/src/main/java/org/keycloak/authentication/RequiredActionContextResult.java
@@ -4,7 +4,7 @@ import org.jboss.resteasy.spi.HttpRequest;
import org.keycloak.common.ClientConnection;
import org.keycloak.OAuth2Constants;
import org.keycloak.events.EventBuilder;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.ClientSessionModel;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpConfirmLinkAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpConfirmLinkAuthenticator.java
old mode 100644
new mode 100755
index 6d6281d968..a99a59c04d
--- a/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpConfirmLinkAuthenticator.java
+++ b/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpConfirmLinkAuthenticator.java
@@ -10,7 +10,7 @@ import org.keycloak.authentication.AuthenticationFlowException;
import org.keycloak.authentication.authenticators.broker.util.ExistingUserInfo;
import org.keycloak.authentication.authenticators.broker.util.SerializedBrokeredIdentityContext;
import org.keycloak.broker.provider.BrokeredIdentityContext;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.ClientSessionModel;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpEmailVerificationAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpEmailVerificationAuthenticator.java
old mode 100644
new mode 100755
index 9780d6a134..5c74b17208
--- a/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpEmailVerificationAuthenticator.java
+++ b/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpEmailVerificationAuthenticator.java
@@ -18,7 +18,7 @@ import org.keycloak.events.Details;
import org.keycloak.events.Errors;
import org.keycloak.events.EventBuilder;
import org.keycloak.events.EventType;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.ClientSessionModel;
import org.keycloak.models.Constants;
import org.keycloak.models.KeycloakSession;
diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpReviewProfileAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpReviewProfileAuthenticator.java
old mode 100644
new mode 100755
index aa7ed77d18..1cf11b721c
--- a/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpReviewProfileAuthenticator.java
+++ b/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpReviewProfileAuthenticator.java
@@ -13,7 +13,7 @@ import org.keycloak.common.util.ObjectUtil;
import org.keycloak.events.Details;
import org.keycloak.events.EventBuilder;
import org.keycloak.events.EventType;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.AuthenticatorConfigModel;
import org.keycloak.models.IdentityProviderModel;
import org.keycloak.models.KeycloakSession;
diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpUsernamePasswordForm.java b/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpUsernamePasswordForm.java
old mode 100644
new mode 100755
index 616a3c4405..17149e90dd
--- a/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpUsernamePasswordForm.java
+++ b/services/src/main/java/org/keycloak/authentication/authenticators/broker/IdpUsernamePasswordForm.java
@@ -8,7 +8,7 @@ import org.keycloak.authentication.AuthenticationFlowError;
import org.keycloak.authentication.AuthenticationFlowException;
import org.keycloak.authentication.authenticators.browser.UsernamePasswordForm;
import org.keycloak.authentication.authenticators.broker.util.SerializedBrokeredIdentityContext;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.UserModel;
import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.services.messages.Messages;
diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/browser/OTPFormAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/browser/OTPFormAuthenticator.java
index 3991011178..c372ec1cc9 100755
--- a/services/src/main/java/org/keycloak/authentication/authenticators/browser/OTPFormAuthenticator.java
+++ b/services/src/main/java/org/keycloak/authentication/authenticators/browser/OTPFormAuthenticator.java
@@ -4,7 +4,7 @@ import org.keycloak.authentication.AuthenticationFlowError;
import org.keycloak.authentication.AuthenticationFlowContext;
import org.keycloak.authentication.Authenticator;
import org.keycloak.events.Errors;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.UserCredentialModel;
diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/browser/SpnegoAuthenticator.java b/services/src/main/java/org/keycloak/authentication/authenticators/browser/SpnegoAuthenticator.java
index 92d3f2130f..f1c0128661 100755
--- a/services/src/main/java/org/keycloak/authentication/authenticators/browser/SpnegoAuthenticator.java
+++ b/services/src/main/java/org/keycloak/authentication/authenticators/browser/SpnegoAuthenticator.java
@@ -7,7 +7,7 @@ import org.keycloak.authentication.AuthenticationFlowContext;
import org.keycloak.authentication.Authenticator;
import org.keycloak.common.constants.KerberosConstants;
import org.keycloak.events.Errors;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.CredentialValidationOutput;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
diff --git a/services/src/main/java/org/keycloak/authentication/authenticators/browser/UsernamePasswordForm.java b/services/src/main/java/org/keycloak/authentication/authenticators/browser/UsernamePasswordForm.java
index ba3fdd3a63..a2581e3350 100755
--- a/services/src/main/java/org/keycloak/authentication/authenticators/browser/UsernamePasswordForm.java
+++ b/services/src/main/java/org/keycloak/authentication/authenticators/browser/UsernamePasswordForm.java
@@ -5,7 +5,7 @@ import org.jboss.resteasy.specimpl.MultivaluedMapImpl;
import org.keycloak.authentication.AuthenticationFlowContext;
import org.keycloak.authentication.AuthenticationProcessor;
import org.keycloak.authentication.Authenticator;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.models.UserModel;
diff --git a/services/src/main/java/org/keycloak/authentication/forms/RegistrationPage.java b/services/src/main/java/org/keycloak/authentication/forms/RegistrationPage.java
index 9a0e9951a6..88689e1902 100755
--- a/services/src/main/java/org/keycloak/authentication/forms/RegistrationPage.java
+++ b/services/src/main/java/org/keycloak/authentication/forms/RegistrationPage.java
@@ -4,7 +4,7 @@ import org.keycloak.Config;
import org.keycloak.authentication.FormAuthenticator;
import org.keycloak.authentication.FormAuthenticatorFactory;
import org.keycloak.authentication.FormContext;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.AuthenticationExecutionModel;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
diff --git a/services/src/main/java/org/keycloak/authentication/forms/RegistrationPassword.java b/services/src/main/java/org/keycloak/authentication/forms/RegistrationPassword.java
index 027419c827..d2ab7e3243 100755
--- a/services/src/main/java/org/keycloak/authentication/forms/RegistrationPassword.java
+++ b/services/src/main/java/org/keycloak/authentication/forms/RegistrationPassword.java
@@ -7,7 +7,7 @@ import org.keycloak.authentication.FormContext;
import org.keycloak.authentication.ValidationContext;
import org.keycloak.events.Details;
import org.keycloak.events.Errors;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.AuthenticationExecutionModel;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
diff --git a/services/src/main/java/org/keycloak/authentication/forms/RegistrationProfile.java b/services/src/main/java/org/keycloak/authentication/forms/RegistrationProfile.java
index 3baae6fe3a..ebd48b0402 100755
--- a/services/src/main/java/org/keycloak/authentication/forms/RegistrationProfile.java
+++ b/services/src/main/java/org/keycloak/authentication/forms/RegistrationProfile.java
@@ -7,7 +7,7 @@ import org.keycloak.authentication.FormContext;
import org.keycloak.authentication.ValidationContext;
import org.keycloak.events.Details;
import org.keycloak.events.Errors;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.AuthenticationExecutionModel;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
diff --git a/services/src/main/java/org/keycloak/authentication/forms/RegistrationRecaptcha.java b/services/src/main/java/org/keycloak/authentication/forms/RegistrationRecaptcha.java
index a640b70ce4..601e9cb51c 100755
--- a/services/src/main/java/org/keycloak/authentication/forms/RegistrationRecaptcha.java
+++ b/services/src/main/java/org/keycloak/authentication/forms/RegistrationRecaptcha.java
@@ -15,7 +15,7 @@ import org.keycloak.authentication.ValidationContext;
import org.keycloak.connections.httpclient.HttpClientProvider;
import org.keycloak.events.Details;
import org.keycloak.events.Errors;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.AuthenticationExecutionModel;
import org.keycloak.models.AuthenticatorConfigModel;
import org.keycloak.models.KeycloakSession;
diff --git a/services/src/main/java/org/keycloak/authentication/forms/RegistrationUserCreation.java b/services/src/main/java/org/keycloak/authentication/forms/RegistrationUserCreation.java
index dfc2a89731..7e139a1a41 100755
--- a/services/src/main/java/org/keycloak/authentication/forms/RegistrationUserCreation.java
+++ b/services/src/main/java/org/keycloak/authentication/forms/RegistrationUserCreation.java
@@ -8,7 +8,7 @@ import org.keycloak.authentication.ValidationContext;
import org.keycloak.events.Details;
import org.keycloak.events.Errors;
import org.keycloak.events.EventType;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.AuthenticationExecutionModel;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.KeycloakSessionFactory;
diff --git a/services/src/main/java/org/keycloak/authentication/requiredactions/VerifyEmail.java b/services/src/main/java/org/keycloak/authentication/requiredactions/VerifyEmail.java
index 7fc77a81d8..3fccd85dc0 100755
--- a/services/src/main/java/org/keycloak/authentication/requiredactions/VerifyEmail.java
+++ b/services/src/main/java/org/keycloak/authentication/requiredactions/VerifyEmail.java
@@ -7,7 +7,7 @@ import org.keycloak.authentication.RequiredActionFactory;
import org.keycloak.authentication.RequiredActionProvider;
import org.keycloak.events.Details;
import org.keycloak.events.EventType;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.ClientSessionModel;
import org.keycloak.models.Constants;
import org.keycloak.models.KeycloakSession;
diff --git a/services/src/main/java/org/keycloak/protocol/oidc/OIDCLoginProtocolService.java b/services/src/main/java/org/keycloak/protocol/oidc/OIDCLoginProtocolService.java
index 613b048900..382e85cd49 100755
--- a/services/src/main/java/org/keycloak/protocol/oidc/OIDCLoginProtocolService.java
+++ b/services/src/main/java/org/keycloak/protocol/oidc/OIDCLoginProtocolService.java
@@ -7,7 +7,7 @@ import org.keycloak.OAuth2Constants;
import org.keycloak.events.EventBuilder;
import org.keycloak.jose.jwk.JWK;
import org.keycloak.jose.jwk.JWKBuilder;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.KeycloakSession;
import org.keycloak.models.RealmModel;
import org.keycloak.protocol.oidc.endpoints.AuthorizationEndpoint;
@@ -18,7 +18,6 @@ import org.keycloak.protocol.oidc.endpoints.TokenIntrospectionEndpoint;
import org.keycloak.protocol.oidc.endpoints.UserInfoEndpoint;
import org.keycloak.protocol.oidc.endpoints.ValidateTokenEndpoint;
import org.keycloak.protocol.oidc.representations.JSONWebKeySet;
-import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.services.resources.RealmsResource;
import javax.ws.rs.GET;
diff --git a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/AuthorizationEndpoint.java b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/AuthorizationEndpoint.java
index 7e69581a66..6f0fdaebc4 100755
--- a/services/src/main/java/org/keycloak/protocol/oidc/endpoints/AuthorizationEndpoint.java
+++ b/services/src/main/java/org/keycloak/protocol/oidc/endpoints/AuthorizationEndpoint.java
@@ -11,7 +11,7 @@ import org.keycloak.events.Details;
import org.keycloak.events.Errors;
import org.keycloak.events.EventBuilder;
import org.keycloak.events.EventType;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.AuthenticationFlowModel;
import org.keycloak.models.ClientModel;
import org.keycloak.models.ClientSessionModel;
@@ -25,7 +25,6 @@ import org.keycloak.protocol.oidc.utils.OIDCResponseType;
import org.keycloak.protocol.oidc.utils.RedirectUtils;
import org.keycloak.services.ErrorPageException;
import org.keycloak.services.Urls;
-import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.services.managers.ClientSessionCode;
import org.keycloak.services.messages.Messages;
import org.keycloak.services.resources.LoginActionsService;
diff --git a/services/src/main/java/org/keycloak/services/ErrorPage.java b/services/src/main/java/org/keycloak/services/ErrorPage.java
index 5f4da73bde..2320bc1ed8 100755
--- a/services/src/main/java/org/keycloak/services/ErrorPage.java
+++ b/services/src/main/java/org/keycloak/services/ErrorPage.java
@@ -21,7 +21,7 @@
*/
package org.keycloak.services;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.KeycloakSession;
import javax.ws.rs.core.Response;
diff --git a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java
index 2e63e57ea7..c27f3a4a1d 100755
--- a/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java
+++ b/services/src/main/java/org/keycloak/services/managers/AuthenticationManager.java
@@ -32,7 +32,7 @@ import org.keycloak.events.Errors;
import org.keycloak.events.EventBuilder;
import org.keycloak.events.EventType;
import org.keycloak.jose.jws.JWSBuilder;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.*;
import org.keycloak.models.utils.KeycloakModelUtils;
import org.keycloak.protocol.LoginProtocol;
diff --git a/services/src/main/java/org/keycloak/services/resources/AccountService.java b/services/src/main/java/org/keycloak/services/resources/AccountService.java
index 08ad37a533..38833b7249 100755
--- a/services/src/main/java/org/keycloak/services/resources/AccountService.java
+++ b/services/src/main/java/org/keycloak/services/resources/AccountService.java
@@ -22,14 +22,14 @@
package org.keycloak.services.resources;
import org.jboss.logging.Logger;
-import org.keycloak.account.AccountPages;
-import org.keycloak.account.AccountProvider;
+import org.keycloak.forms.account.AccountPages;
+import org.keycloak.forms.account.AccountProvider;
import org.keycloak.events.Details;
import org.keycloak.events.Event;
import org.keycloak.events.EventBuilder;
import org.keycloak.events.EventStoreProvider;
import org.keycloak.events.EventType;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.AccountRoles;
import org.keycloak.models.ClientModel;
import org.keycloak.models.ClientSessionModel;
diff --git a/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java b/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java
index 57a2d26439..20c2897c5f 100755
--- a/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java
+++ b/services/src/main/java/org/keycloak/services/resources/IdentityBrokerService.java
@@ -36,7 +36,7 @@ import org.keycloak.common.util.Time;
import org.keycloak.events.Details;
import org.keycloak.events.EventBuilder;
import org.keycloak.events.EventType;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.AuthenticationFlowModel;
import org.keycloak.models.ClientModel;
import org.keycloak.models.ClientSessionModel;
diff --git a/services/src/main/java/org/keycloak/services/resources/LoginActionsService.java b/services/src/main/java/org/keycloak/services/resources/LoginActionsService.java
index cf9e8e212d..6f654b8aa0 100755
--- a/services/src/main/java/org/keycloak/services/resources/LoginActionsService.java
+++ b/services/src/main/java/org/keycloak/services/resources/LoginActionsService.java
@@ -21,7 +21,6 @@
*/
package org.keycloak.services.resources;
-import org.apache.http.auth.AUTH;
import org.jboss.logging.Logger;
import org.jboss.resteasy.spi.HttpRequest;
import org.keycloak.authentication.authenticators.broker.AbstractIdpAuthenticator;
@@ -42,7 +41,7 @@ import org.keycloak.events.Details;
import org.keycloak.events.Errors;
import org.keycloak.events.EventBuilder;
import org.keycloak.events.EventType;
-import org.keycloak.login.LoginFormsProvider;
+import org.keycloak.forms.login.LoginFormsProvider;
import org.keycloak.models.AuthenticationFlowModel;
import org.keycloak.models.ClientModel;
import org.keycloak.models.ClientSessionModel;