diff --git a/core/src/main/java/org/keycloak/util/MimeTypeUtil.java b/core/src/main/java/org/keycloak/util/MimeTypeUtil.java
new file mode 100644
index 0000000000..75270bd382
--- /dev/null
+++ b/core/src/main/java/org/keycloak/util/MimeTypeUtil.java
@@ -0,0 +1,29 @@
+package org.keycloak.util;
+
+import javax.activation.MimetypesFileTypeMap;
+import java.io.File;
+
+/**
+ * @author Stian Thorgersen
+ */
+public class MimeTypeUtil {
+
+ private static MimetypesFileTypeMap map = new MimetypesFileTypeMap();
+ static {
+ map.addMimeTypes("text/css css CSS");
+ map.addMimeTypes("text/javascript js JS");
+ map.addMimeTypes("text/javascript js JS");
+ map.addMimeTypes("image/png png PNG");
+ map.addMimeTypes("image/svg+xml svg SVG");
+ map.addMimeTypes("text/html html htm HTML HTM");
+ }
+
+ public static String getContentType(File file) {
+ return map.getContentType(file);
+ }
+
+ public static String getContentType(String path) {
+ return map.getContentType(path);
+ }
+
+}
diff --git a/distribution/appliance-dist/assembly.xml b/distribution/appliance-dist/assembly.xml
index 37f59db68c..9001f26c8c 100755
--- a/distribution/appliance-dist/assembly.xml
+++ b/distribution/appliance-dist/assembly.xml
@@ -37,9 +37,6 @@
${project.build.directory}/unpacked/modules
keycloak/modules/system/layers/base
-
- org/picketlink/**
-
${project.build.directory}/unpacked/deployments/auth-server.war/WEB-INF/classes/META-INF
diff --git a/distribution/modules/build.xml b/distribution/modules/build.xml
index 69eb308c3e..208e061b7e 100755
--- a/distribution/modules/build.xml
+++ b/distribution/modules/build.xml
@@ -1,136 +1,365 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/pom.xml b/distribution/modules/pom.xml
index 60286e6fa1..bf5c7c0305 100755
--- a/distribution/modules/pom.xml
+++ b/distribution/modules/pom.xml
@@ -17,11 +17,22 @@
Keycloak JBoss Modules
pom
+
+ org.keycloak
+ keycloak-dependencies-server-all
+ ${project.version}
+ pom
+
org.keycloak
keycloak-core
${project.version}
+
+ org.keycloak
+ keycloak-core-jaxrs
+ ${project.version}
+
org.keycloak
keycloak-adapter-core
@@ -52,15 +63,17 @@
keycloak-subsystem
${project.version}
+
+ org.keycloak.subsystem
+ keycloak-server
+ ${project.version}
+ war
+
org.keycloak
keycloak-as7-subsystem
${project.version}
-
- org.bouncycastle
- bcprov-jdk15on
-
org.wildfly.core
wildfly-cli
@@ -230,7 +243,7 @@
- org.keycloak
+ org.keycloak.subsystem
keycloak-server
${project.version}
war
diff --git a/distribution/modules/src/main/resources/modules/com/google/zxing/core/main/module.xml b/distribution/modules/src/main/resources/modules/com/google/zxing/core/main/module.xml
new file mode 100755
index 0000000000..78a8c49302
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/com/google/zxing/core/main/module.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/com/google/zxing/javase/main/module.xml b/distribution/modules/src/main/resources/modules/com/google/zxing/javase/main/module.xml
new file mode 100755
index 0000000000..a08a5f9005
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/com/google/zxing/javase/main/module.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/de/idyl/winzipaes/main/module.xml b/distribution/modules/src/main/resources/modules/de/idyl/winzipaes/main/module.xml
new file mode 100755
index 0000000000..7d13910ed5
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/de/idyl/winzipaes/main/module.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/net/iharder/base64/main/module.xml b/distribution/modules/src/main/resources/modules/net/iharder/base64/main/module.xml
index 5f39dcfc2c..352ee9c498 100755
--- a/distribution/modules/src/main/resources/modules/net/iharder/base64/main/module.xml
+++ b/distribution/modules/src/main/resources/modules/net/iharder/base64/main/module.xml
@@ -1,26 +1,6 @@
-
+
diff --git a/distribution/modules/src/main/resources/modules/org/bouncycastle/main/module.xml b/distribution/modules/src/main/resources/modules/org/bouncycastle/main/module.xml
deleted file mode 100755
index d0ec17b9e1..0000000000
--- a/distribution/modules/src/main/resources/modules/org/bouncycastle/main/module.xml
+++ /dev/null
@@ -1,33 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/distribution/modules/src/main/resources/modules/org/freemarker/main/module.xml b/distribution/modules/src/main/resources/modules/org/freemarker/main/module.xml
new file mode 100755
index 0000000000..90b6464676
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/freemarker/main/module.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/jboss/aesh/main/module.xml b/distribution/modules/src/main/resources/modules/org/jboss/aesh/main/module.xml
old mode 100644
new mode 100755
index 5b3cf8d454..6fe34f6f22
--- a/distribution/modules/src/main/resources/modules/org/jboss/aesh/main/module.xml
+++ b/distribution/modules/src/main/resources/modules/org/jboss/aesh/main/module.xml
@@ -1,26 +1,6 @@
-
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-account-api/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-account-api/main/module.xml
new file mode 100755
index 0000000000..8432c99484
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-account-api/main/module.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-account-freemarker/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-account-freemarker/main/module.xml
new file mode 100755
index 0000000000..1790a854d8
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-account-freemarker/main/module.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-adapter-core/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-adapter-core/main/module.xml
index 2af6613ec2..1fee40c52e 100755
--- a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-adapter-core/main/module.xml
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-adapter-core/main/module.xml
@@ -1,26 +1,6 @@
-
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-as7-adapter/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-as7-adapter/main/module.xml
index e42ded8ab0..b5c6191821 100755
--- a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-as7-adapter/main/module.xml
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-as7-adapter/main/module.xml
@@ -1,26 +1,6 @@
-
+
@@ -28,7 +8,7 @@
-
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-as7-subsystem/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-as7-subsystem/main/module.xml
index 37603763e7..50f423478d 100755
--- a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-as7-subsystem/main/module.xml
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-as7-subsystem/main/module.xml
@@ -1,26 +1,6 @@
-
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-broker-core/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-broker-core/main/module.xml
new file mode 100755
index 0000000000..4d48a6e880
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-broker-core/main/module.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-broker-oidc/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-broker-oidc/main/module.xml
new file mode 100755
index 0000000000..e2cac38839
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-broker-oidc/main/module.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-broker-saml/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-broker-saml/main/module.xml
new file mode 100755
index 0000000000..f16869073d
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-broker-saml/main/module.xml
@@ -0,0 +1,15 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-connections-infinispan/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-connections-infinispan/main/module.xml
new file mode 100755
index 0000000000..d6b86d5c1b
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-connections-infinispan/main/module.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-connections-jpa-liquibase/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-connections-jpa-liquibase/main/module.xml
new file mode 100755
index 0000000000..f52bc84788
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-connections-jpa-liquibase/main/module.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-connections-jpa/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-connections-jpa/main/module.xml
new file mode 100755
index 0000000000..070b3b0d70
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-connections-jpa/main/module.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-connections-mongo/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-connections-mongo/main/module.xml
new file mode 100755
index 0000000000..5f4aa72140
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-connections-mongo/main/module.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-core-jaxrs/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-core-jaxrs/main/module.xml
new file mode 100755
index 0000000000..6c99976670
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-core-jaxrs/main/module.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-core/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-core/main/module.xml
index 095e41903c..c10c776c26 100755
--- a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-core/main/module.xml
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-core/main/module.xml
@@ -1,26 +1,6 @@
-
+
@@ -30,9 +10,10 @@
-
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-email-api/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-email-api/main/module.xml
new file mode 100755
index 0000000000..5a9c4f98f2
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-email-api/main/module.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-email-freemarker/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-email-freemarker/main/module.xml
new file mode 100755
index 0000000000..23003490cc
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-email-freemarker/main/module.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-api/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-api/main/module.xml
new file mode 100755
index 0000000000..af1ceeb9ff
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-api/main/module.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-email/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-email/main/module.xml
new file mode 100755
index 0000000000..209116515d
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-email/main/module.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-jboss-logging/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-jboss-logging/main/module.xml
new file mode 100755
index 0000000000..b786cfcf48
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-jboss-logging/main/module.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-jpa/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-jpa/main/module.xml
new file mode 100755
index 0000000000..f902c4e1a1
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-jpa/main/module.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-mongo/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-mongo/main/module.xml
new file mode 100755
index 0000000000..3e20796874
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-events-mongo/main/module.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-export-import-api/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-export-import-api/main/module.xml
new file mode 100755
index 0000000000..b36c5cb7cf
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-export-import-api/main/module.xml
@@ -0,0 +1,24 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-export-import-dir/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-export-import-dir/main/module.xml
new file mode 100755
index 0000000000..db4ee600b4
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-export-import-dir/main/module.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-export-import-single-file/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-export-import-single-file/main/module.xml
new file mode 100755
index 0000000000..12dfd46f25
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-export-import-single-file/main/module.xml
@@ -0,0 +1,25 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-export-import-zip/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-export-import-zip/main/module.xml
new file mode 100755
index 0000000000..1351976b3b
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-export-import-zip/main/module.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-forms-common-freemarker/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-forms-common-freemarker/main/module.xml
new file mode 100755
index 0000000000..b3798a3a1f
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-forms-common-freemarker/main/module.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-forms-common-themes/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-forms-common-themes/main/module.xml
new file mode 100755
index 0000000000..e9359dc22f
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-forms-common-themes/main/module.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-invalidation-cache-infinispan/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-invalidation-cache-infinispan/main/module.xml
new file mode 100755
index 0000000000..45729feee2
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-invalidation-cache-infinispan/main/module.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-invalidation-cache-model/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-invalidation-cache-model/main/module.xml
new file mode 100755
index 0000000000..5e222dbdd7
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-invalidation-cache-model/main/module.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-jboss-adapter-core/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-jboss-adapter-core/main/module.xml
index 5ecc097b6e..b84e377136 100755
--- a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-jboss-adapter-core/main/module.xml
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-jboss-adapter-core/main/module.xml
@@ -1,26 +1,6 @@
-
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-js-adapter/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-js-adapter/main/module.xml
new file mode 100755
index 0000000000..5a2fdf085e
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-js-adapter/main/module.xml
@@ -0,0 +1,12 @@
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-ldap-federation/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-ldap-federation/main/module.xml
new file mode 100755
index 0000000000..5c81548dc9
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-ldap-federation/main/module.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-login-api/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-login-api/main/module.xml
new file mode 100755
index 0000000000..8fcd75c8f0
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-login-api/main/module.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-login-freemarker/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-login-freemarker/main/module.xml
new file mode 100755
index 0000000000..e7b2d3526b
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-login-freemarker/main/module.xml
@@ -0,0 +1,26 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-api/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-api/main/module.xml
new file mode 100755
index 0000000000..30ce7636da
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-api/main/module.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-jpa/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-jpa/main/module.xml
new file mode 100755
index 0000000000..5603e027aa
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-jpa/main/module.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-mongo/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-mongo/main/module.xml
new file mode 100755
index 0000000000..2017d49455
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-mongo/main/module.xml
@@ -0,0 +1,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-sessions-infinispan/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-sessions-infinispan/main/module.xml
new file mode 100755
index 0000000000..b17720e3fc
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-sessions-infinispan/main/module.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-sessions-jpa/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-sessions-jpa/main/module.xml
new file mode 100755
index 0000000000..b26bce7757
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-sessions-jpa/main/module.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-sessions-mem/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-sessions-mem/main/module.xml
new file mode 100755
index 0000000000..6e6b3472d1
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-sessions-mem/main/module.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-sessions-mongo/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-sessions-mongo/main/module.xml
new file mode 100755
index 0000000000..8e562076af
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-model-sessions-mongo/main/module.xml
@@ -0,0 +1,18 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-picketlink-api/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-picketlink-api/main/module.xml
new file mode 100755
index 0000000000..b51112b48a
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-picketlink-api/main/module.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-picketlink-ldap/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-picketlink-ldap/main/module.xml
new file mode 100755
index 0000000000..429188fbb2
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-picketlink-ldap/main/module.xml
@@ -0,0 +1,21 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-saml-protocol/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-saml-protocol/main/module.xml
new file mode 100755
index 0000000000..44f4d75106
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-saml-protocol/main/module.xml
@@ -0,0 +1,30 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-server/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-server/main/module.xml
new file mode 100755
index 0000000000..a2efd4ac4a
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-server/main/module.xml
@@ -0,0 +1,64 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-services/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-services/main/module.xml
new file mode 100755
index 0000000000..e98c558b5a
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-services/main/module.xml
@@ -0,0 +1,79 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-core/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-core/main/module.xml
new file mode 100755
index 0000000000..76b344d25d
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-core/main/module.xml
@@ -0,0 +1,20 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-facebook/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-facebook/main/module.xml
new file mode 100755
index 0000000000..a3db93e3c7
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-facebook/main/module.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-github/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-github/main/module.xml
new file mode 100755
index 0000000000..ad2223940e
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-github/main/module.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-google/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-google/main/module.xml
new file mode 100755
index 0000000000..e1ba05b13a
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-google/main/module.xml
@@ -0,0 +1,22 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-twitter/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-twitter/main/module.xml
new file mode 100755
index 0000000000..3f67efef05
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-social-twitter/main/module.xml
@@ -0,0 +1,23 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-timer-api/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-timer-api/main/module.xml
new file mode 100755
index 0000000000..0140db4a67
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-timer-api/main/module.xml
@@ -0,0 +1,16 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-timer-basic/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-timer-basic/main/module.xml
new file mode 100755
index 0000000000..6147e17e02
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-timer-basic/main/module.xml
@@ -0,0 +1,17 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-undertow-adapter/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-undertow-adapter/main/module.xml
index 9d19d40521..8059df1748 100755
--- a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-undertow-adapter/main/module.xml
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-undertow-adapter/main/module.xml
@@ -1,26 +1,6 @@
-
+
@@ -28,7 +8,7 @@
-
+
diff --git a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-wildfly-adapter/main/module.xml b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-wildfly-adapter/main/module.xml
index a89bac4e34..4402e8a16f 100755
--- a/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-wildfly-adapter/main/module.xml
+++ b/distribution/modules/src/main/resources/modules/org/keycloak/keycloak-wildfly-adapter/main/module.xml
@@ -1,26 +1,6 @@
-
+
@@ -28,7 +8,7 @@
-
+
diff --git a/distribution/modules/src/main/resources/modules/org/liquibase/main/module.xml b/distribution/modules/src/main/resources/modules/org/liquibase/main/module.xml
new file mode 100755
index 0000000000..23826c4b39
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/liquibase/main/module.xml
@@ -0,0 +1,14 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/mongodb/mongo-java-driver/main/module.xml b/distribution/modules/src/main/resources/modules/org/mongodb/mongo-java-driver/main/module.xml
new file mode 100755
index 0000000000..d07ac5d9eb
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/mongodb/mongo-java-driver/main/module.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/modules/src/main/resources/modules/org/twitter4j/main/module.xml b/distribution/modules/src/main/resources/modules/org/twitter4j/main/module.xml
new file mode 100755
index 0000000000..887a044a24
--- /dev/null
+++ b/distribution/modules/src/main/resources/modules/org/twitter4j/main/module.xml
@@ -0,0 +1,13 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/distribution/pom.xml b/distribution/pom.xml
index f7283649ca..dd6a947afb 100755
--- a/distribution/pom.xml
+++ b/distribution/pom.xml
@@ -25,6 +25,7 @@
+ subsystem-war
modules
as7-adapter-zip
tomcat6-adapter-zip
diff --git a/distribution/subsystem-war/pom.xml b/distribution/subsystem-war/pom.xml
new file mode 100755
index 0000000000..18b0dfd5a3
--- /dev/null
+++ b/distribution/subsystem-war/pom.xml
@@ -0,0 +1,40 @@
+
+
+
+ keycloak-parent
+ org.keycloak
+ 1.2.0.Beta1-SNAPSHOT
+ ../../pom.xml
+
+
+ 4.0.0
+ org.keycloak.subsystem
+ keycloak-server
+ war
+ Keycloak Subsystem Server WAR
+
+
+
+
+
+
+ auth-server
+
+
+ org.jboss.as.plugins
+ jboss-as-maven-plugin
+
+ false
+
+
+
+ org.wildfly.plugins
+ wildfly-maven-plugin
+
+ false
+
+
+
+
+
diff --git a/distribution/subsystem-war/src/main/resources/META-INF/keycloak-server.json b/distribution/subsystem-war/src/main/resources/META-INF/keycloak-server.json
new file mode 100755
index 0000000000..9f0d03ea5d
--- /dev/null
+++ b/distribution/subsystem-war/src/main/resources/META-INF/keycloak-server.json
@@ -0,0 +1,72 @@
+{
+ "admin": {
+ "realm": "master"
+ },
+
+ "eventsStore": {
+ "provider": "jpa",
+ "jpa": {
+ "exclude-events": [ "REFRESH_TOKEN" ]
+ }
+ },
+
+ "realm": {
+ "provider": "jpa"
+ },
+
+ "user": {
+ "provider": "jpa"
+ },
+
+ "userSessions": {
+ "provider" : "mem"
+ },
+
+ "realmCache": {
+ "provider": "mem"
+ },
+
+ "userCache": {
+ "provider": "mem",
+ "mem": {
+ "maxSize": 20000
+ }
+ },
+
+ "timer": {
+ "provider": "basic"
+ },
+
+ "theme": {
+ "default": "keycloak",
+ "staticMaxAge": 2592000,
+ "cacheTemplates": true,
+ "cacheThemes": true,
+ "folder": {
+ "dir": "${jboss.server.config.dir}/themes"
+ }
+ },
+
+ "login": {
+ "provider": "freemarker"
+ },
+
+ "account": {
+ "provider": "freemarker"
+ },
+
+ "email": {
+ "provider": "freemarker"
+ },
+
+ "scheduled": {
+ "interval": 900
+ },
+
+ "connectionsJpa": {
+ "default": {
+ "dataSource": "java:jboss/datasources/KeycloakDS",
+ "databaseSchema": "update"
+ }
+ }
+}
\ No newline at end of file
diff --git a/distribution/subsystem-war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml b/distribution/subsystem-war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
new file mode 100755
index 0000000000..356b953564
--- /dev/null
+++ b/distribution/subsystem-war/src/main/webapp/WEB-INF/jboss-deployment-structure.xml
@@ -0,0 +1,71 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/distribution/subsystem-war/src/main/webapp/WEB-INF/web.xml b/distribution/subsystem-war/src/main/webapp/WEB-INF/web.xml
new file mode 100755
index 0000000000..7228afe95f
--- /dev/null
+++ b/distribution/subsystem-war/src/main/webapp/WEB-INF/web.xml
@@ -0,0 +1,52 @@
+
+
+
+ auth
+
+
+ Keycloak REST Interface
+ org.jboss.resteasy.plugins.server.servlet.HttpServlet30Dispatcher
+
+ javax.ws.rs.Application
+ org.keycloak.services.resources.KeycloakApplication
+
+
+ resteasy.servlet.mapping.prefix
+ /
+
+ 1
+ true
+
+
+
+ org.keycloak.services.listeners.KeycloakSessionDestroyListener
+
+
+
+ Keycloak Client Connection Filter
+ org.keycloak.services.filters.ClientConnectionFilter
+
+
+
+ Keycloak Session Management
+ org.keycloak.services.filters.KeycloakSessionServletFilter
+
+
+
+ Keycloak Session Management
+ /*
+
+
+
+ Keycloak Client Connection Filter
+ /*
+
+
+
+ Keycloak REST Interface
+ /*
+
+
diff --git a/forms/login-freemarker/pom.xml b/forms/login-freemarker/pom.xml
index 637ba88b17..944157c6d9 100755
--- a/forms/login-freemarker/pom.xml
+++ b/forms/login-freemarker/pom.xml
@@ -62,14 +62,13 @@
provided
- org.freemarker
- freemarker
+ org.freemarker
+ freemarker
provided
-
+
- org.jboss
- jboss-vfs
- 3.2.2.Final
+ org.jboss.logging
+ jboss-logging
provided
diff --git a/services/src/main/java/org/keycloak/services/resources/ThemeResource.java b/services/src/main/java/org/keycloak/services/resources/ThemeResource.java
index 19ddaec856..2021ed8a4d 100755
--- a/services/src/main/java/org/keycloak/services/resources/ThemeResource.java
+++ b/services/src/main/java/org/keycloak/services/resources/ThemeResource.java
@@ -5,9 +5,8 @@ import org.keycloak.Config;
import org.keycloak.freemarker.Theme;
import org.keycloak.freemarker.ThemeProvider;
import org.keycloak.models.KeycloakSession;
+import org.keycloak.util.MimeTypeUtil;
-import javax.activation.FileTypeMap;
-import javax.activation.MimetypesFileTypeMap;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
@@ -26,8 +25,6 @@ public class ThemeResource {
private static final Logger logger = Logger.getLogger(ThemeResource.class);
- private static FileTypeMap mimeTypes = MimetypesFileTypeMap.getDefaultFileTypeMap();
-
@Context
private KeycloakSession session;
@@ -51,7 +48,7 @@ public class ThemeResource {
cacheControl.setNoTransform(false);
cacheControl.setMaxAge(Config.scope("theme").getInt("staticMaxAge", -1));
- return Response.ok(resource).type(mimeTypes.getContentType(path)).cacheControl(cacheControl).build();
+ return Response.ok(resource).type(MimeTypeUtil.getContentType(path)).cacheControl(cacheControl).build();
} else {
return Response.status(Response.Status.NOT_FOUND).build();
}
diff --git a/services/src/main/java/org/keycloak/services/resources/WelcomeResource.java b/services/src/main/java/org/keycloak/services/resources/WelcomeResource.java
index f0f9b506d3..3feacf1f5d 100755
--- a/services/src/main/java/org/keycloak/services/resources/WelcomeResource.java
+++ b/services/src/main/java/org/keycloak/services/resources/WelcomeResource.java
@@ -5,9 +5,8 @@ import org.keycloak.Config;
import org.keycloak.freemarker.Theme;
import org.keycloak.freemarker.ThemeProvider;
import org.keycloak.models.KeycloakSession;
+import org.keycloak.util.MimeTypeUtil;
-import javax.activation.FileTypeMap;
-import javax.activation.MimetypesFileTypeMap;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
@@ -28,8 +27,6 @@ public class WelcomeResource {
private static final Logger logger = Logger.getLogger(WelcomeResource.class);
- private static FileTypeMap mimeTypes = MimetypesFileTypeMap.getDefaultFileTypeMap();
-
@Context
private UriInfo uriInfo;
@@ -70,7 +67,7 @@ public class WelcomeResource {
Theme theme = themeProvider.getTheme(config.get("welcomeTheme"), Theme.Type.WELCOME);
InputStream resource = theme.getResourceAsStream(path);
if (resource != null) {
- String contentType = mimeTypes.getContentType(path);
+ String contentType = MimeTypeUtil.getContentType(path);
CacheControl cacheControl = new CacheControl();
cacheControl.setNoTransform(false);
diff --git a/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java b/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java
index 13dbe251e7..7b4c1c93a3 100755
--- a/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java
+++ b/services/src/main/java/org/keycloak/services/resources/admin/AdminConsole.java
@@ -24,9 +24,8 @@ import org.keycloak.services.managers.ApplicationManager;
import org.keycloak.services.managers.AuthenticationManager;
import org.keycloak.services.managers.RealmManager;
import org.keycloak.services.resources.KeycloakApplication;
+import org.keycloak.util.MimeTypeUtil;
-import javax.activation.FileTypeMap;
-import javax.activation.MimetypesFileTypeMap;
import javax.ws.rs.GET;
import javax.ws.rs.Path;
import javax.ws.rs.PathParam;
@@ -260,8 +259,6 @@ public class AdminConsole {
return realmManager.getKeycloakAdminstrationRealm();
}
- private static FileTypeMap mimeTypes = MimetypesFileTypeMap.getDefaultFileTypeMap();
-
/**
* Main page of this realm's admin console
*
@@ -319,7 +316,7 @@ public class AdminConsole {
Theme theme = themeProvider.getTheme(realm.getAdminTheme(), Theme.Type.ADMIN);
InputStream resource = theme.getResourceAsStream(path);
if (resource != null) {
- String contentType = mimeTypes.getContentType(path);
+ String contentType = MimeTypeUtil.getContentType(path);
CacheControl cacheControl = new CacheControl();
cacheControl.setNoTransform(false);
diff --git a/services/src/main/resources/META-INF/mime.types b/services/src/main/resources/META-INF/mime.types
deleted file mode 100755
index 11de430b04..0000000000
--- a/services/src/main/resources/META-INF/mime.types
+++ /dev/null
@@ -1,6 +0,0 @@
-text/css css CSS
-text/javascript js JS
-text/javascript js JS
-image/png png PNG
-image/svg+xml svg SVG
-text/html html htm HTML HTM
\ No newline at end of file