Compare commits

..
1 Commits
Author SHA1 Message Date
Stian Thorgersen 1199e26a65 Version bump 2014-09-01 10:14:35 +02:00
190 changed files with 751 additions and 995 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
</parent> </parent>
<name>Connections Parent</name> <name>Connections Parent</name>
<description/> <description/>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -3
View File
@@ -14,7 +14,7 @@ public class Version {
public static String VERSION; public static String VERSION;
public static String BUILD_TIME; public static String BUILD_TIME;
public static final String UNKNOWN = "UNKNOWN"; public static final String UNKNOWN = "UNKNOWN";
public static final Version SINGLETON; public static final Version SINGLETON = new Version();
private final String version = VERSION; private final String version = VERSION;
private final String buildTime = BUILD_TIME; private final String buildTime = BUILD_TIME;
@@ -30,8 +30,6 @@ public class Version {
VERSION=UNKNOWN; VERSION=UNKNOWN;
BUILD_TIME=UNKNOWN; BUILD_TIME=UNKNOWN;
} }
SINGLETON = new Version();
} }
@JsonProperty("version") @JsonProperty("version")
@@ -1,19 +0,0 @@
package org.keycloak.util;
import java.net.URI;
/**
* @author <a href="mailto:sthorger@redhat.com">Stian Thorgersen</a>
*/
public class UriUtils {
public static String getOrigin(URI uri) {
return getOrigin(uri.toString());
}
public static String getOrigin(String uri) {
String u = uri.toString();
return u.substring(0, u.indexOf('/', 8));
}
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -2
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
@@ -88,7 +88,6 @@
<artifactId>keycloak-js-adapter</artifactId> <artifactId>keycloak-js-adapter</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<outputDirectory>${project.build.directory}/unpacked/js-adapter</outputDirectory> <outputDirectory>${project.build.directory}/unpacked/js-adapter</outputDirectory>
<includes>*.js</includes>
</artifactItem> </artifactItem>
</artifactItems> </artifactItems>
<excludes>**/welcome-content/*</excludes> <excludes>**/welcome-content/*</excludes>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
+8 -1
View File
@@ -8,6 +8,7 @@
<exclude name="**/*.iml"/> <exclude name="**/*.iml"/>
<exclude name="**/*.unconfigured"/> <exclude name="**/*.unconfigured"/>
<exclude name="**/subsystem-config.xml"/> <exclude name="**/subsystem-config.xml"/>
<exclude name="**/README.md.overview"/>
</fileset> </fileset>
</copy> </copy>
<copy todir="target/examples/cordova" overwrite="true"> <copy todir="target/examples/cordova" overwrite="true">
@@ -16,6 +17,7 @@
<exclude name="**/*.iml"/> <exclude name="**/*.iml"/>
<exclude name="**/*.unconfigured"/> <exclude name="**/*.unconfigured"/>
<exclude name="**/subsystem-config.xml"/> <exclude name="**/subsystem-config.xml"/>
<exclude name="**/README.md.overview"/>
</fileset> </fileset>
</copy> </copy>
<copy todir="target/examples/providers" overwrite="true"> <copy todir="target/examples/providers" overwrite="true">
@@ -24,6 +26,7 @@
<exclude name="**/*.iml"/> <exclude name="**/*.iml"/>
<exclude name="**/*.unconfigured"/> <exclude name="**/*.unconfigured"/>
<exclude name="**/subsystem-config.xml"/> <exclude name="**/subsystem-config.xml"/>
<exclude name="**/README.md.overview"/>
</fileset> </fileset>
</copy> </copy>
<copy todir="target/examples/js-console" overwrite="true"> <copy todir="target/examples/js-console" overwrite="true">
@@ -32,6 +35,7 @@
<exclude name="**/*.iml"/> <exclude name="**/*.iml"/>
<exclude name="**/*.unconfigured"/> <exclude name="**/*.unconfigured"/>
<exclude name="**/subsystem-config.xml"/> <exclude name="**/subsystem-config.xml"/>
<exclude name="**/README.md.overview"/>
</fileset> </fileset>
</copy> </copy>
<copy todir="target/examples/themes" overwrite="true"> <copy todir="target/examples/themes" overwrite="true">
@@ -40,6 +44,7 @@
<exclude name="**/*.iml"/> <exclude name="**/*.iml"/>
<exclude name="**/*.unconfigured"/> <exclude name="**/*.unconfigured"/>
<exclude name="**/subsystem-config.xml"/> <exclude name="**/subsystem-config.xml"/>
<exclude name="**/README.md.overview"/>
</fileset> </fileset>
</copy> </copy>
<copy todir="target/examples/preconfigured-demo" overwrite="true"> <copy todir="target/examples/preconfigured-demo" overwrite="true">
@@ -48,6 +53,7 @@
<exclude name="**/*.iml"/> <exclude name="**/*.iml"/>
<exclude name="**/*.unconfigured"/> <exclude name="**/*.unconfigured"/>
<exclude name="**/subsystem-config.xml"/> <exclude name="**/subsystem-config.xml"/>
<exclude name="**/README.md.overview"/>
</fileset> </fileset>
</copy> </copy>
<copy todir="target/examples/unconfigured-demo" overwrite="true"> <copy todir="target/examples/unconfigured-demo" overwrite="true">
@@ -59,9 +65,10 @@
<exclude name="**/target/**"/> <exclude name="**/target/**"/>
<exclude name="**/*.iml"/> <exclude name="**/*.iml"/>
<exclude name="**/README.md"/> <exclude name="**/README.md"/>
<exclude name="**/README.md.overview"/>
</fileset> </fileset>
</copy> </copy>
<copy file="../../examples/README.md" tofile="target/examples/README.md"/> <copy file="../../examples/demo-template/README.md.overview" tofile="target/examples/README.md"/>
<move file="target/examples/unconfigured-demo/README.md.unconfigured" tofile="target/examples/unconfigured-demo/README.md"/> <move file="target/examples/unconfigured-demo/README.md.unconfigured" tofile="target/examples/unconfigured-demo/README.md"/>
<move file="target/examples/unconfigured-demo/customer-app/src/main/webapp/WEB-INF/web.xml.unconfigured" tofile="target/examples/unconfigured-demo/customer-app/src/main/webapp/WEB-INF/web.xml"/> <move file="target/examples/unconfigured-demo/customer-app/src/main/webapp/WEB-INF/web.xml.unconfigured" tofile="target/examples/unconfigured-demo/customer-app/src/main/webapp/WEB-INF/web.xml"/>
<move file="target/examples/unconfigured-demo/product-app/src/main/webapp/WEB-INF/web.xml.unconfigured" tofile="target/examples/unconfigured-demo/product-app/src/main/webapp/WEB-INF/web.xml"/> <move file="target/examples/unconfigured-demo/product-app/src/main/webapp/WEB-INF/web.xml.unconfigured" tofile="target/examples/unconfigured-demo/product-app/src/main/webapp/WEB-INF/web.xml"/>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
+1 -1
View File
@@ -30,7 +30,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<name>Distribution</name> <name>Distribution</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
+1 -2
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
@@ -89,7 +89,6 @@
<artifactId>keycloak-js-adapter</artifactId> <artifactId>keycloak-js-adapter</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
<outputDirectory>${project.build.directory}/unpacked/js-adapter</outputDirectory> <outputDirectory>${project.build.directory}/unpacked/js-adapter</outputDirectory>
<includes>*.js</includes>
</artifactItem> </artifactItem>
</artifactItems> </artifactItems>
</configuration> </configuration>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
+4 -8
View File
@@ -1,19 +1,15 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" <project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"> xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-reference-guide-${translation}</artifactId> <artifactId>keycloak-reference-guide-${translation}</artifactId>
<version>1.0-rc-2</version>
<packaging>jdocbook</packaging> <packaging>jdocbook</packaging>
<name>Keycloak Reference Guide (${translation})</name> <name>Keycloak Reference Guide (${translation})</name>
<description/> <description/>
<modelVersion>4.0.0</modelVersion>
<repositories> <repositories>
<repository> <repository>
<id>jboss</id> <id>jboss</id>
+1 -1
View File
@@ -38,7 +38,7 @@
<bookinfo> <bookinfo>
<title>Keycloak Reference Guide</title> <title>Keycloak Reference Guide</title>
<subtitle>SSO for Web Apps and REST Services</subtitle> <subtitle>SSO for Web Apps and REST Services</subtitle>
<releaseinfo>&project.version;</releaseinfo> <releaseinfo>1.0-rc-2</releaseinfo>
</bookinfo> </bookinfo>
<toc/> <toc/>
@@ -152,7 +152,7 @@
of roles that an application or oauth client is allowed to ask permission for. Access tokens are always of roles that an application or oauth client is allowed to ask permission for. Access tokens are always
granted at the request of a specific application or oauth client. This also holds true for SSO. As you visit granted at the request of a specific application or oauth client. This also holds true for SSO. As you visit
different sites, the application will redirect back to the Keycloak Server via the OAuth 2.0 protocol to obtain an access different sites, the application will redirect back to the Keycloak Server via the OAuth 2.0 protocol to obtain an access
token specific to that application. The role mappings contained within the token are the intersection token specific to that application. The role mappings contained within the token are the union
between the set of user role mappings and the permission scope of the application/oauth client. So, between the set of user role mappings and the permission scope of the application/oauth client. So,
access tokens are tailor made for each application/oauth client and contain only the information required access tokens are tailor made for each application/oauth client and contain only the information required
for by them. for by them.
@@ -11,7 +11,7 @@
"realm-public-key" : "MIGfMA0GCSqGSIb3D...31LwIDAQAB", "realm-public-key" : "MIGfMA0GCSqGSIb3D...31LwIDAQAB",
"auth-server-url" : "https://localhost:8443/auth", "auth-server-url" : "https://localhost:8443/auth",
"ssl-required" : "external", "ssl-required" : "external",
"use-resource-role-mappings" : false, "user-resource-role-mappings" : false,
"enable-cors" : true, "enable-cors" : true,
"cors-max-age" : 1000, "cors-max-age" : 1000,
"cors-allowed-methods" : [ "POST", "PUT", "DELETE", "GET" ], "cors-allowed-methods" : [ "POST", "PUT", "DELETE", "GET" ],
@@ -101,7 +101,7 @@
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry> <varlistentry>
<term>use-resource-role-mappings</term> <term>user-resource-role-mappings</term>
<listitem> <listitem>
<para> <para>
If set to true, the adapter will look inside the token for application level role mappings for If set to true, the adapter will look inside the token for application level role mappings for
@@ -8,11 +8,11 @@
<itemizedlist> <itemizedlist>
<listitem> <listitem>
keycloak-appliance-dist-all-&project.version;.zip keycloak-appliance-dist-all-1.0-rc-2.zip
</listitem> </listitem>
<listitem> <listitem>
keycloak-war-dist-all-&project.version;.zip keycloak-war-dist-all-1.0-rc-2.zip
</listitem> </listitem>
</itemizedlist> </itemizedlist>
@@ -22,7 +22,7 @@
<title>Appliance Install</title> <title>Appliance Install</title>
<para> <para>
The The
<literal>keycloak-appliance-dist-all-&project.version;.zip</literal> <literal>keycloak-appliance-dist-all.zip</literal>
is quite large, but contains a complete server (backed by Wildfly) is quite large, but contains a complete server (backed by Wildfly)
that runs out of the box. The only thing you'll have to enable and configure is SSL. Unzipping it, the that runs out of the box. The only thing you'll have to enable and configure is SSL. Unzipping it, the
directory layout looks directory layout looks
@@ -31,7 +31,7 @@
<para> <para>
<programlisting> <programlisting>
keycloak-appliance-dist-all-&project.version;/ keycloak-appliance-dist-all-1.0-rc-2/
keycloak/ keycloak/
bin/ bin/
standalone.sh standalone.sh
@@ -42,9 +42,9 @@ keycloak-appliance-dist-all-&project.version;/
keycloak-server.json keycloak-server.json
themes/ themes/
adapters/ adapters/
keycloak-as7-adapter-dist-&project.version;.zip keycloak-as7-adapter-dist-1.0-rc-2.zip
keycloak-eap6-adapter-dist-&project.version;.zip keycloak-eap6-adapter-dist-1.0-rc-2.zip
keycloak-wildfly-adapter-dist-&project.version;.zip keycloak-wildfly-adapter-dist-1.0-rc-2.zip
examples/ examples/
docs/ docs/
</programlisting> </programlisting>
@@ -67,7 +67,7 @@ keycloak-appliance-dist-all-&project.version;/
<title>WAR Distribution Installation</title> <title>WAR Distribution Installation</title>
<para> <para>
The The
<literal>keycloak-war-dist-all-&project.version;.zip</literal> <literal>keycloak-war-dist-all.zip</literal>
contains contains
just the bits you need to install keycloak on your favorite web container. We currently only support just the bits you need to install keycloak on your favorite web container. We currently only support
installing it on top of an existing JBoss AS 7.1.1, JBoss EAP 6.x, or Wildfly 8 distribution. We may in the installing it on top of an existing JBoss AS 7.1.1, JBoss EAP 6.x, or Wildfly 8 distribution. We may in the
@@ -79,7 +79,7 @@ keycloak-appliance-dist-all-&project.version;/
</para> </para>
<para> <para>
<programlisting> <programlisting>
keycloak-war-dist-all-&project.version;/ keycloak-war-dist-all-1.0-rc-2/
deployments/ deployments/
auth-server.war/ auth-server.war/
keycloak-ds.xml keycloak-ds.xml
@@ -87,9 +87,9 @@ keycloak-war-dist-all-&project.version;/
keycloak-server.json keycloak-server.json
themes/ themes/
adapters/ adapters/
keycloak-as7-adapter-dist-&project.version;.zip keycloak-as7-adapter-dist-1.0-rc-2.zip
keycloak-eap6-adapter-dist-&project.version;.zip keycloak-eap6-adapter-dist-1.0-rc-2.zip
keycloak-wildfly-adapter-dist-&project.version;.zip keycloak-wildfly-adapter-dist-1.0-rc-2.zip
examples/ examples/
docs/ docs/
</programlisting> </programlisting>
@@ -101,7 +101,7 @@ keycloak-war-dist-all-&project.version;/
</para> </para>
<para> <para>
<programlisting> <programlisting>
$ cd keycloak-war-dist-all-&project.version; $ cd keycloak-war-dist-all-1.0-rc-2
$ cp -r deployments $JBOSS_HOME/standalone $ cp -r deployments $JBOSS_HOME/standalone
$ cp -r configuration $JBOSS_HOME/standalone $ cp -r configuration $JBOSS_HOME/standalone
</programlisting> </programlisting>
@@ -129,7 +129,7 @@ keycloak-war-dist-all-&project.version;/
<itemizedlist> <itemizedlist>
<listitem> <listitem>
Configuring Keycloak to use a production database. Configuring keycloak to use a production database.
</listitem> </listitem>
<listitem> <listitem>
@@ -144,14 +144,14 @@ keycloak-war-dist-all-&project.version;/
<section> <section>
<title>Relational Database Configuration</title> <title>Relational Database Configuration</title>
<para> <para>
By default, Keycloak uses a relational database to store Keycloak data. This datasource is the <literal>standalone/deployments/keycloak-ds.xml</literal> By default, Keycloak uses a relational database to store Keycloak data. This datasource is the <literal>.../standalone/deployments/keycloak-ds.xml</literal>
file of your Keycloak Server installation if you used <xref linkend="WAR_distribution_installation" /> or in <literal>standalone/configuration/standalone.xml</literal> file of your Keycloak Server installation if you used <xref linkend="WAR_distribution_installation" /> or in <literal>.../standalone/configuration/standalone.xml</literal>
if you used <xref linkend="Appliance_install" />. File <literal>keycloak-ds.xml</literal> is used in WAR if you used <xref linkend="Appliance_install" />. File <literal>keycloak-ds.xml</literal> is used in WAR
distribution, so that you have datasource available out of the box and you don't need to edit <literal>standalone.xml</literal> file. distribution, so that you have datasource available out of the box and you don't need to edit <literal>standalone.xml</literal> file.
However a good thing is to always delete the file <literal>keycloak-ds.xml</literal> and move its configuration text However a good thing is to always delete the file <literal>keycloak-ds.xml</literal> and move its configuration text
into the centrally managed <literal>standalone.xml</literal> file. into the centrally managed <literal>standalone.xml</literal> file.
This will allow you to manage the database connection pool from the Wildfly/JBoss administration console. Here's what This will allow you to manage the database connection pool from the Wildfly/JBoss administration console. Here's what
<literal>standalone/configuration/standalone.xml</literal> should look like after you've done this: <literal>.../standalone/configuration/standalone.xml</literal> should look like after you've done this:
</para> </para>
<para> <para>
<programlisting><![CDATA[ <programlisting><![CDATA[
@@ -180,8 +180,8 @@ keycloak-war-dist-all-&project.version;/
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class> <xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver> </driver>
</drivers> </drivers>
</datasources> </datasources>
</subsystem> </subsystem>
]]> ]]>
</programlisting> </programlisting>
</para> </para>
@@ -206,6 +206,16 @@ keycloak-war-dist-all-&project.version;/
]]></programlisting> ]]></programlisting>
Possible configuration options are: Possible configuration options are:
<variablelist> <variablelist>
<varlistentry>
<term>unitName</term>
<listitem>
<para>
Allow you to specify name of persistence unit if you want to provide your own persistence.xml file for JPA configuration.
If this option is used, then all other configuration options are ignored as you are expected to configure
all JPA/DB properties in your own persistence.xml file. Hence you can remove properties "dataSource" and "databaseSchema" in this case.
</para>
</listitem>
</varlistentry>
<varlistentry> <varlistentry>
<term>dataSource</term> <term>dataSource</term>
<listitem> <listitem>
@@ -255,16 +265,6 @@ keycloak-war-dist-all-&project.version;/
</para> </para>
</listitem> </listitem>
</varlistentry> </varlistentry>
<varlistentry>
<term>unitName</term>
<listitem>
<para>
Allow you to specify name of persistence unit if you want to provide your own persistence.xml file for JPA configuration.
If this option is used, then all other configuration options are ignored as you are expected to configure
all JPA/DB properties in your own persistence.xml file. Hence you can remove properties "dataSource" and "databaseSchema" in this case.
</para>
</listitem>
</varlistentry>
</variablelist> </variablelist>
For more info about Hibernate properties, see <ulink url="http://hibernate.org/orm/documentation/">Hibernate and JPA documentation</ulink> . For more info about Hibernate properties, see <ulink url="http://hibernate.org/orm/documentation/">Hibernate and JPA documentation</ulink> .
</para> </para>
@@ -350,9 +350,6 @@ keycloak-war-dist-all-&project.version;/
<programlisting><![CDATA[ <programlisting><![CDATA[
"eventsStore": { "eventsStore": {
"provider": "mongo", "provider": "mongo",
"mongo": {
"exclude-events": [ "REFRESH_TOKEN" ]
}
}, },
"realm": { "realm": {
@@ -361,7 +358,7 @@ keycloak-war-dist-all-&project.version;/
"user": { "user": {
"provider": "mongo" "provider": "mongo"
}, }
]]></programlisting> ]]></programlisting>
And at the end of the file add the snippet like this where you can configure details about your Mongo database: And at the end of the file add the snippet like this where you can configure details about your Mongo database:
@@ -671,6 +668,17 @@ keycloak-war-dist-all-&project.version;/
</web-app>]]></programlisting> </web-app>]]></programlisting>
</para> </para>
</section> </section>
<section>
<title>Enforce HTTPS at Realm Level</title>
<para>
In Keycloak, each realm has an "Require SSL" switch that you should turn on. Log into the
adminstration console and set this switch for each realm that Keycloak manages. This switch is on
the <literal>Settings>>General</literal> page. While this switch does do similar checks as the security
constraint in <literal>web.xml</literal>, it will also force applications and oauth clients to only
register HTTPS based redirect URLs.
</para>
</section>
</section> </section>
</section> </section>
+5 -7
View File
@@ -22,13 +22,6 @@
the list and the status should be <literal>ON</literal>). the list and the status should be <literal>ON</literal>).
</para> </para>
</listitem> </listitem>
<listitem>
<para>
Now click on the <literal>Consent screen</literal> link on the sidebar menu on the left. You must specify
a project name and choose an email for the consent screen. Otherwise users will get a login error. There's
other things you can configure here like what the consent screen looks like. Feel free to play around with this.
</para>
</listitem>
<listitem> <listitem>
<para> <para>
Now click <literal>Credentials</literal> in the sidebar on the left. Then click Now click <literal>Credentials</literal> in the sidebar on the left. Then click
@@ -47,4 +40,9 @@
</para> </para>
</listitem> </listitem>
</orderedlist> </orderedlist>
<para>
You may also want to configure how the Google Consent Screen looks when users log in to your application via
Google. To do this go to <ulink url="https://cloud.google.com/console/project">Google Developer Console</ulink>
and click on <literal>Consent Screen</literal> in the sidebar to the left.
</para>
</section> </section>
@@ -10,7 +10,9 @@
<title>Configure theme</title> <title>Configure theme</title>
<para> <para>
To configure the theme used by a realm open the <literal>Keycloak Admin Console</literal>, select your realm To configure the theme used by a realm open the <literal>Keycloak Admin Console</literal>, select your realm
from the drop-down box in the top left corner. Under <literal>Settings</literal> click on <literal>Theme</literal>. from the drop-down box in the top left corner. In the <literal>Optional Settings</literal> use the drop-down
boxes for <literal>Login Theme</literal> and <literal>Account Theme</literal> to select the theme used
by login forms and account management pages.
</para> </para>
</section> </section>
@@ -54,7 +56,7 @@
templates. templates.
</para> </para>
<para> <para>
To create a new theme, create a folder in <literal>.../standalone/configuration/themes/&lt;theme type&gt;</literal>. To create a new theme, create a folder in <literal>.../standalone/configuration/themes/&lt; theme type&gt;</literal>.
The name of the folder is the name of the theme. Then create a file <literal>theme.properties</literal> inside the theme folder. The name of the folder is the name of the theme. Then create a file <literal>theme.properties</literal> inside the theme folder.
The contents of the file should be: The contents of the file should be:
</para> </para>
@@ -77,7 +79,6 @@
<programlisting>styles=css/styles.css css/more-styles.css</programlisting> <programlisting>styles=css/styles.css css/more-styles.css</programlisting>
</section> </section>
<section> <section>
<title>Scripts</title>
<para> <para>
A theme can have one or more scripts, to add a script create a file inside <literal>resources/js</literal> (for example <literal>resources/js/script.js</literal>) A theme can have one or more scripts, to add a script create a file inside <literal>resources/js</literal> (for example <literal>resources/js/script.js</literal>)
inside your theme folder. Then registering it in <literal>theme.properties</literal> by adding: inside your theme folder. Then registering it in <literal>theme.properties</literal> by adding:
@@ -153,7 +154,7 @@
</para> </para>
<para> <para>
Keycloaks default account management provider is built on the FreeMarker template engine (<literal>forms/account-freemarker</literal>). Keycloaks default account management provider is built on the FreeMarker template engine (<literal>forms/account-freemarker</literal>).
To make sure your provider is loaded you will either need to delete <literal>standalone/deployments/auth-server.war/WEB-INF/lib/keycloak-account-freemarker-&project.version;.jar</literal> To make sure your provider is loaded you will either need to delete <literal>standalone/deployments/auth-server.war/WEB-INF/lib/keycloak-account-freemarker-1.0-rc-2.jar</literal>
or disable it with the system property <literal>org.keycloak.account.freemarker.FreeMarkerAccountProviderFactory</literal>. or disable it with the system property <literal>org.keycloak.account.freemarker.FreeMarkerAccountProviderFactory</literal>.
</para> </para>
</section> </section>
@@ -166,7 +167,7 @@
</para> </para>
<para> <para>
Keycloaks default login forms provider is built on the FreeMarker template engine (<literal>forms/login-freemarker</literal>). Keycloaks default login forms provider is built on the FreeMarker template engine (<literal>forms/login-freemarker</literal>).
To make sure your provider is loaded you will either need to delete <literal>standalone/deployments/auth-server.war/WEB-INF/lib/keycloak-login-freemarker-&project.version;.jar</literal> To make sure your provider is loaded you will either need to delete <literal>standalone/deployments/auth-server.war/WEB-INF/lib/keycloak-login-freemarker-1.0-rc-2.jar</literal>
or disable it with the system property <literal>org.keycloak.login.freemarker.FreeMarkerLoginFormsProviderFactory</literal>. or disable it with the system property <literal>org.keycloak.login.freemarker.FreeMarkerLoginFormsProviderFactory</literal>.
</para> </para>
</section> </section>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>keycloak-events-parent</artifactId> <artifactId>keycloak-events-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>keycloak-events-parent</artifactId> <artifactId>keycloak-events-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>keycloak-events-parent</artifactId> <artifactId>keycloak-events-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>keycloak-events-parent</artifactId> <artifactId>keycloak-events-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>keycloak-events-parent</artifactId> <artifactId>keycloak-events-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
-48
View File
@@ -1,48 +0,0 @@
Keycloak Examples
=================
This directory contains a number of examples for Keycloak.
Demo
----
This is the our main example, which shows Login, Single-Sign On, Single-Sign Out and OAuth Token Grant. The demo comes in two flavours:
* Preconfigured - Use this flavour to quickly deploy the demo to a local Keycloak server without having to configure anything other than importing the realm settings into Keycloak
* Unconfigured - Use this flavour to manually configure and deploy the demo to either a local or external Keycloak server
For more information look at `preconfigured-demo/README.md` or `unconfigured-demo/README.md`. For the unconfigured-demo there's an accompanying screencast at [http://keycloak.org/docs](http://keycloak.org/docs) that walks you through the setup process.
Cordova
-------
Example Cordova application. For more information look at `cordova/README.md`.
CORS
----
Example CORS application. For more information look at `cors/README.md`.
JS Console
----------
Example JavaScript application that let's you experiment with the JavaScript adapter. For more information look at `js-console/README.md`.
Providers
---------
Example providers for Event Listener SPI, Event Store SPI and User Federation SPI. For more information look at:
* Event Listener that outputs event detalis to sysout - `providers/event-listener-sysout/README.md`
* Event Store that stores events in memory - `providers/event-store-mem/README.md`
* User Federation that loads users from a text file - `providers/federation-provider/README.md`
Themes
------
Example themes to change the look and feel of login forms, account management console and admin console. For more information look at `themes/README.md`.
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../../pom.xml</relativePath> <relativePath>../../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -34,7 +34,6 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<hr />
<div> <div>
<h2><span>Realm Roles</span></h2> <h2><span>Realm Roles</span></h2>
<button type="submit" data-ng-click="loadRoles()">load Roles</button> <button type="submit" data-ng-click="loadRoles()">load Roles</button>
@@ -53,34 +52,6 @@
</tbody> </tbody>
</table> </table>
</div> </div>
<hr />
<div>
<h2><span>Social providers</span></h2>
<button type="submit" data-ng-click="loadServerInfo()">load available social providers</button>
<table class="table" data-ng-show="serverInfo.socialProviders.length > 0">
<thead>
<tr>
<th>Available social providers</th>
</tr>
</thead>
<tbody>
<tr data-ng-repeat="sp in serverInfo.socialProviders">
<td>{{sp}}</a></td>
</tr>
</tbody>
</table>
</div>
<hr />
<div>
<h2><span>Realm info</span></h2>
<button type="submit" data-ng-click="loadPublicRealmInfo()">Load public realm info</button>
<div data-ng-show="realm">
Realm name: {{realm.realm}} <br/>
Public key: {{realm.public_key}} <br/>
</div>
</div>
<hr />
</div> </div>
</body> </body>
</html> </html>
@@ -58,20 +58,6 @@ module.controller('GlobalCtrl', function($scope, $http) {
}); });
}; };
$scope.loadServerInfo = function() {
$http.get("http://localhost-auth:8080/auth/admin/serverinfo").success(function(data) {
$scope.serverInfo = angular.fromJson(data);
});
};
$scope.loadPublicRealmInfo = function() {
$http.get("http://localhost-auth:8080/auth/realms/cors").success(function(data) {
$scope.realm = angular.fromJson(data);
});
};
$scope.logout = logout; $scope.logout = logout;
}); });
+3 -5
View File
@@ -1,11 +1,9 @@
{ {
"realm": "cors", "realm": "cors",
"enabled": true, "enabled": true,
"accessTokenLifespan": 60, "accessTokenLifespan": 3000,
"accessCodeLifespan": 60, "accessCodeLifespan": 10,
"accessCodeLifespanUserAction": 300, "accessCodeLifespanUserAction": 6000,
"ssoSessionIdleTimeout": 600,
"ssoSessionMaxLifespan": 36000,
"sslRequired": "external", "sslRequired": "external",
"registrationAllowed": false, "registrationAllowed": false,
"social": false, "social": false,
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../../pom.xml</relativePath> <relativePath>../../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<name>Examples</name> <name>Examples</name>
+10
View File
@@ -0,0 +1,10 @@
Login, Distributed SSO, Distributed Logout, and OAuth Token Grant Examples
===================================
Preconfigured Examples
===================================
The Preconfigured Examples (in 'preconfigured-demo') contains pre-configured examples that can be deployed without having to configure anything except importing the realm settings into Keycloak. To try this out follow the instructions in preconfigured-demo/README.md.
Unconfigured Examples
===================================
The Unconfigured Examples (in 'unconfigured-demo') contains examples without any Keycloak specific configuration. These should be used in conjunction with the online screencasts tutorials at [http://keycloak.org/docs](http://keycloak.org/docs).
+1 -128
View File
@@ -1,137 +1,10 @@
Unconfigured Examples Unconfigured Examples
=================================== ===================================
This set of projects contains a stripped down version of the demo described in preconfigured-demo. All keycloak specific This set of projects contains a stripped down version of the demo described in preconfigured-demo. All keycloak specific
configuration has been removed. Use this project in conjunction with instructions below and/or the online screencast tutorials at configuration has been removed. Use this project in conjunction with the online screencast tutorials at
[http://keycloak.org/docs](http://keycloak.org/docs). [http://keycloak.org/docs](http://keycloak.org/docs).
# Run Demo with an external Keycloak Server
These instructions assume you've already installed and started a Keycloak Server. Keycloak can be running on your locally or remotely (for example on OpenShift). If you're not running Keycloak locally you'll also need a locally running WildFly server.
## Create Realm
Open the Keycloak admin console and click on `Add Realm`. Enter `demo` as the name for the realm and click `Save`.
The demo applications uses two realm roles, `user` and `admin`, so the next step is to create these. Click on `Roles` then click on `Add Role`. Use `user` as the role name and click `Save`. Repeat to create a role with the name `admin`.
Next you'll either want to enable user registration or create a new user.
### Enable user registration
To enable user registration first click on `Roles` then `Default Roles`. Select the `user` role and click on the right arrow. This will make sure that all new users are automatically assigned the `user` role. Next step is to enable user registration for the realm. Click on `Settings` then `Login`. Click on the toggle for `user registration` to allow users to self-register.
### Create user
To create a new user click on `Users` then `Add User`. You are required to at least fill in the `username` field, but you may want to fill in values for the other fields as well. After you've completed the form click on `Save`. To allow the user to login you also need to set a password for the user. To do this click on `Credentials`. Enter a new password for the user. If you leave the `Temporary` toggle ON the user will be required to reset the password on the next login.
## Deploy Demo Applications
First you need to install WildFly application server. Second step is to install the Keycloak WildFly subsystem. To do this run:
# cd <WILDFLY HOME>
# unzip <KEYCLOAK DIST>/adapters/keycloak-wildfly-adapter-dist-<KEYCLOAK VERSION>.zip
Next configure the Keycloak adapter by editing `standalone/configuration/standalone.xml`. Add a new child-element to `<extensions>`:
<extensions>
....
<extension module="org.keycloak.keycloak-wildfly-subsystem"/>
</extensions>
You also need to add realm config to the same file. Add a new child-element to `<profile>`:
<profile>
....
<subsystem xmlns="urn:jboss:domain:keycloak:1.0">
<realm name="demo">
<realm-public-key>REALM PUBLIC KEY</realm-public-key>
<auth-server-url>KEYCLOAK URL</auth-server-url>
<ssl-required>external</ssl-required>
</realm>
</subsystem>
</profile>
In the above snippet replace the following:
* `REALM PUBLIC KEY` - replace with the public key for the realm. You can find this in the admin console by selecting the realm, then clicking on `Keys`
* `KEYCLOAK URL` - replace with the base url of Keycloak (for example http://localhost:8080/auth or http://keycloak.example.org/auth)
Don't start the WildFly server until you've configured and deployed the demo applications.
### Database Services
Most demo applications connects to the REST services provided by the database-services application, so start with deploying this.
Run the following to deploy it:
# cd database-services
# mvn install
# cp target/database.war <WILDFLY HOME>/standalone/deployments
Next add the configuration for it to the Keycloak subsystem. Edit `<WILDFLY HOME>/standalone/configuration/standalone.xml` to `<subsystem xmlns="urn:jboss:domain:keycloak:1.0">` add:
<secure-deployment name="database.war">
<realm>demo</realm>
<resource>database-service</resource>
<bearer-only>true</bearer-only>
</secure-deployment>
### Customer Portal
Next deploy the customer portal application.
Run the following to deploy it:
# cd customer-app
# mvn install
# cp target/customer-portal.war <WILDFLY HOME>/standalone/deployments
Then open the Keycloak admin console to add a configuration for it. Navigate to the realm and click on `Applications` then `Add Application`. Fill in the form with:
* Name - `customer-portal`
* Redirect URI - `http://localhost:8080/customer-portal/*` (click `Add` after filling in the field)
Then click on `Save`. As it's a confidential (non-public) application you need the secret for it. Click on `Credentials` and note the value of the `Secret` field.
Then edit `<WILDFLY HOME>/standalone/configuration/standalone.xml` and add the following to `<subsystem xmlns="urn:jboss:domain:keycloak:1.0">`:
<secure-deployment name="customer-portal.war">
<realm>demo</realm>
<resource>customer-portal</resource>
<credential name="secret">APPLICATION SECRET</credential>
</secure-deployment>
In the above snippet replace the following:
* `APPLICATION SECRET` - replace with the applications secret you just noted from the Keycloak admin console
### Product Portal
Next deploy the product portal application.
Run the following to deploy it:
# cd product-app
# mvn install
# cp target/product-portal.war <WILDFLY HOME>/standalone/deployments
Then open the Keycloak admin console to add a configuration for it. Navigate to the realm and click on `Applications` then `Add Application`. Fill in the form with:
* Name - `product-portal`
* Redirect URI - `http://localhost:8080/product-portal/*` (click `Add` after filling in the field)
Then click on `Save`. As it's a confidential (non-public) application you need the secret for it. Click on `Credentials` and note the value of the `Secret` field.
Then edit `<WILDFLY HOME>/standalone/configuration/standalone.xml` and add the following to `<subsystem xmlns="urn:jboss:domain:keycloak:1.0">`:
<secure-deployment name="product-portal.war">
<realm>demo</realm>
<resource>product-portal</resource>
<credential name="secret">484ba263-8bb5-4048-bb6f-40da75e9eefb</credential>
</secure-deployment>
In the above snippet replace the following:
* `APPLICATION SECRET` - replace with the applications secret you just noted from the Keycloak admin console
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../../pom.xml</relativePath> <relativePath>../../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../../pom.xml</relativePath> <relativePath>../../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../../pom.xml</relativePath> <relativePath>../../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../../pom.xml</relativePath> <relativePath>../../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../../pom.xml</relativePath> <relativePath>../../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../../pom.xml</relativePath> <relativePath>../../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../../pom.xml</relativePath> <relativePath>../../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<name>Examples</name> <name>Examples</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../../pom.xml</relativePath> <relativePath>../../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../../pom.xml</relativePath> <relativePath>../../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../../pom.xml</relativePath> <relativePath>../../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<name>Examples</name> <name>Examples</name>
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>examples-providers-pom</artifactId> <artifactId>examples-providers-pom</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<name>Event Listener System.out Example</name> <name>Event Listener System.out Example</name>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>examples-providers-pom</artifactId> <artifactId>examples-providers-pom</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<name>Event Store In-Mem Example</name> <name>Event Store In-Mem Example</name>
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>examples-providers-pom</artifactId> <artifactId>examples-providers-pom</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<name>Properties Authentication Provider Example</name> <name>Properties Authentication Provider Example</name>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>examples-pom</artifactId> <artifactId>examples-pom</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<name>Provider Examples</name> <name>Provider Examples</name>
+3 -18
View File
@@ -1,19 +1,4 @@
Example Themes Example Login Theme
============== ===================
Sunrise Login Theme To deploy copy login/sunrise to standalone/configuration/themes/login/. Open the admin console, select your realm, in the drop-down for login theme select sunrise. Then login to your realm to see the new theme in action.
-------------------
Example login theme that changes the look of the login forms.
To use the theme copy `login/sunrise` to `standalone/configuration/themes/login/`. Open the admin console, select your realm, click on `Theme`. In the dropdown for `Login Theme` select `sunrise`. Click `Save` and login to the realm to see the new theme in action.
Change Logo Theme
-----------------
Example themes for login forms, account management and admin console that changes the Keycloak logo.
To use the themes copy `account/logo-example` to `standalone/configuration/themes/account/`, `login/logo-example` to `standalone/configuration/themes/login/` and `admin/logo-example` to `standalone/configuration/themes/admin/`. Open the admin console, select your realm, click on `Theme`. In the dropdowns for `Login Theme`, `Account Theme` and `Admin Console Theme` select `logo-example`. Click `Save` and login to the realm to see the new theme in action.
One thing to note is that to change the admin console for the master admin console (`/auth/admin`) you need to change the theme for the master realm. Changing the admin console theme for any other realms will only change the admin console for that specific realm (for example `/auth/admin/myrealm/console`).
@@ -1,8 +0,0 @@
.navbar-title {
background-image: url('../img/red-hat-logo.png');
height: 65px;
background-repeat: no-repeat;
width: 203px;
margin: 3px 10px 5px;
text-indent: -99999px;
}
@@ -1,4 +0,0 @@
parent=keycloak
import=common/keycloak
styles= ../patternfly/lib/patternfly/css/patternfly.css ../patternfly/css/account.css ../keycloak/css/account.css css/account.css
@@ -1,8 +0,0 @@
.navbar-title {
background-image: url('../img/red-hat-logo.png');
height: 65px;
background-repeat: no-repeat;
width: 203px;
margin: 3px 10px 5px;
text-indent: -99999px;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

@@ -1,2 +0,0 @@
parent=keycloak
import=common/keycloak
@@ -1,9 +0,0 @@
#kc-logo-wrapper {
background-image: url("../img/red-hat-logo.png");
background-repeat: no-repeat;
background-position: top right;
height: 65px;
margin: 100px;
}
Binary file not shown.

Before

Width:  |  Height:  |  Size: 2.9 KiB

@@ -1,4 +0,0 @@
parent=keycloak
import=common/keycloak
styles= ../patternfly/lib/patternfly/css/patternfly.css ../patternfly/css/login.css ../patternfly/lib/zocial/zocial.css ../keycloak/css/login.css css/login.css
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-export-import-parent</artifactId> <artifactId>keycloak-export-import-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -1,7 +1,6 @@
package org.keycloak.exportimport.util; package org.keycloak.exportimport.util;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;
import org.keycloak.Version;
import org.keycloak.exportimport.ExportImportConfig; import org.keycloak.exportimport.ExportImportConfig;
import org.keycloak.exportimport.ExportProvider; import org.keycloak.exportimport.ExportProvider;
import org.keycloak.exportimport.UsersExportStrategy; import org.keycloak.exportimport.UsersExportStrategy;
@@ -38,19 +37,12 @@ public abstract class MultipleStepsExportProvider implements ExportProvider {
}); });
for (RealmModel realm : holder.realms) { for (RealmModel realm : holder.realms) {
exportRealmImpl(factory, realm.getName()); exportRealm(factory, realm.getName());
} }
writeVersion("version.json", Version.SINGLETON);
} }
@Override @Override
public void exportRealm(KeycloakSessionFactory factory, String realmName) throws IOException { public void exportRealm(KeycloakSessionFactory factory, final String realmName) throws IOException {
exportRealmImpl(factory, realmName);
writeVersion("version.json", Version.SINGLETON);
}
protected void exportRealmImpl(KeycloakSessionFactory factory, final String realmName) throws IOException {
final UsersExportStrategy usersExportStrategy = ExportImportConfig.getUsersExportStrategy(); final UsersExportStrategy usersExportStrategy = ExportImportConfig.getUsersExportStrategy();
final int usersPerFile = ExportImportConfig.getUsersPerFile(); final int usersPerFile = ExportImportConfig.getUsersPerFile();
final UsersHolder usersHolder = new UsersHolder(); final UsersHolder usersHolder = new UsersHolder();
@@ -110,8 +102,6 @@ public abstract class MultipleStepsExportProvider implements ExportProvider {
protected abstract void writeUsers(String fileName, KeycloakSession session, RealmModel realm, List<UserModel> users) throws IOException; protected abstract void writeUsers(String fileName, KeycloakSession session, RealmModel realm, List<UserModel> users) throws IOException;
protected abstract void writeVersion(String fileName, Version version) throws IOException;
public static class RealmsHolder { public static class RealmsHolder {
List<RealmModel> realms; List<RealmModel> realms;
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-export-import-parent</artifactId> <artifactId>keycloak-export-import-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -1,6 +1,5 @@
package org.keycloak.exportimport.dir; package org.keycloak.exportimport.dir;
import org.keycloak.Version;
import org.keycloak.exportimport.util.ExportUtils; import org.keycloak.exportimport.util.ExportUtils;
import org.keycloak.exportimport.util.MultipleStepsExportProvider; import org.keycloak.exportimport.util.MultipleStepsExportProvider;
import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
@@ -69,13 +68,6 @@ public class DirExportProvider extends MultipleStepsExportProvider {
ExportUtils.exportUsersToStream(session, realm, users, JsonSerialization.prettyMapper, os); ExportUtils.exportUsersToStream(session, realm, users, JsonSerialization.prettyMapper, os);
} }
@Override
protected void writeVersion(String fileName, Version version) throws IOException {
File file = new File(this.rootDirectory, fileName);
FileOutputStream stream = new FileOutputStream(file);
JsonSerialization.prettyMapper.writeValue(stream, version);
}
@Override @Override
public void close() { public void close() {
} }
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-export-import-parent</artifactId> <artifactId>keycloak-export-import-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-export-import-parent</artifactId> <artifactId>keycloak-export-import-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -4,7 +4,6 @@ import de.idyl.winzipaes.AesZipFileEncrypter;
import de.idyl.winzipaes.impl.AESEncrypter; import de.idyl.winzipaes.impl.AESEncrypter;
import de.idyl.winzipaes.impl.AESEncrypterBC; import de.idyl.winzipaes.impl.AESEncrypterBC;
import org.jboss.logging.Logger; import org.jboss.logging.Logger;
import org.keycloak.Version;
import org.keycloak.exportimport.util.ExportUtils; import org.keycloak.exportimport.util.ExportUtils;
import org.keycloak.exportimport.util.MultipleStepsExportProvider; import org.keycloak.exportimport.util.MultipleStepsExportProvider;
import org.keycloak.models.KeycloakSession; import org.keycloak.models.KeycloakSession;
@@ -48,24 +47,17 @@ public class ZipExportProvider extends MultipleStepsExportProvider {
protected void writeRealm(String fileName, RealmRepresentation rep) throws IOException { protected void writeRealm(String fileName, RealmRepresentation rep) throws IOException {
ByteArrayOutputStream stream = new ByteArrayOutputStream(); ByteArrayOutputStream stream = new ByteArrayOutputStream();
JsonSerialization.mapper.writeValue(stream, rep); JsonSerialization.mapper.writeValue(stream, rep);
writeStream(fileName, stream);
byte[] byteArray = stream.toByteArray();
ByteArrayInputStream bis = new ByteArrayInputStream(byteArray);
this.encrypter.add(fileName, bis, this.password);
} }
@Override @Override
protected void writeUsers(String fileName, KeycloakSession session, RealmModel realm, List<UserModel> users) throws IOException { protected void writeUsers(String fileName, KeycloakSession session, RealmModel realm, List<UserModel> users) throws IOException {
ByteArrayOutputStream stream = new ByteArrayOutputStream(); ByteArrayOutputStream stream = new ByteArrayOutputStream();
ExportUtils.exportUsersToStream(session, realm, users, JsonSerialization.mapper, stream); ExportUtils.exportUsersToStream(session, realm, users, JsonSerialization.mapper, stream);
writeStream(fileName, stream);
}
@Override
protected void writeVersion(String fileName, Version version) throws IOException {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
JsonSerialization.mapper.writeValue(stream, version);
writeStream(fileName, stream);
}
private void writeStream(String fileName, ByteArrayOutputStream stream) throws IOException {
byte[] byteArray = stream.toByteArray(); byte[] byteArray = stream.toByteArray();
ByteArrayInputStream bis = new ByteArrayInputStream(byteArray); ByteArrayInputStream bis = new ByteArrayInputStream(byteArray);
this.encrypter.add(fileName, bis, this.password); this.encrypter.add(fileName, bis, this.password);
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../../pom.xml</relativePath> <relativePath>../../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -45,6 +45,7 @@ public class LDAPUtils {
picketlinkUser.setFirstName(firstName); picketlinkUser.setFirstName(firstName);
picketlinkUser.setLastName(lastName); picketlinkUser.setLastName(lastName);
picketlinkUser.setEmail(email); picketlinkUser.setEmail(email);
picketlinkUser.setAttribute(new Attribute("fullName", getFullName(username, firstName, lastName)));
idmManager.update(picketlinkUser); idmManager.update(picketlinkUser);
return picketlinkUser; return picketlinkUser;
} }
+1 -1
View File
@@ -5,7 +5,7 @@
<parent> <parent>
<artifactId>keycloak-parent</artifactId> <artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-forms-parent</artifactId> <artifactId>keycloak-forms-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
-2
View File
@@ -39,7 +39,5 @@ public interface AccountProvider extends Provider {
AccountProvider setPasswordSet(boolean passwordSet); AccountProvider setPasswordSet(boolean passwordSet);
AccountProvider setStateChecker(String stateChecker);
AccountProvider setFeatures(boolean social, boolean events, boolean passwordUpdateSupported); AccountProvider setFeatures(boolean social, boolean events, boolean passwordUpdateSupported);
} }
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-forms-parent</artifactId> <artifactId>keycloak-forms-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -47,7 +47,6 @@ public class FreeMarkerAccountProvider implements AccountProvider {
private RealmModel realm; private RealmModel realm;
private String[] referrer; private String[] referrer;
private List<Event> events; private List<Event> events;
private String stateChecker;
private List<UserSessionModel> sessions; private List<UserSessionModel> sessions;
private boolean socialEnabled; private boolean socialEnabled;
private boolean eventsEnabled; private boolean eventsEnabled;
@@ -108,10 +107,6 @@ public class FreeMarkerAccountProvider implements AccountProvider {
} }
URI baseQueryUri = baseUriBuilder.build(); URI baseQueryUri = baseUriBuilder.build();
if (stateChecker != null) {
attributes.put("stateChecker", stateChecker);
}
if (message != null) { if (message != null) {
attributes.put("message", new MessageBean(messages.containsKey(message) ? messages.getProperty(message) : message, messageType)); attributes.put("message", new MessageBean(messages.containsKey(message) ? messages.getProperty(message) : message, messageType));
} }
@@ -120,7 +115,7 @@ public class FreeMarkerAccountProvider implements AccountProvider {
attributes.put("referrer", new ReferrerBean(referrer)); attributes.put("referrer", new ReferrerBean(referrer));
} }
attributes.put("url", new UrlBean(realm, theme, baseUri, baseQueryUri, uriInfo.getRequestUri(), stateChecker)); attributes.put("url", new UrlBean(realm, theme, baseUri, baseQueryUri, uriInfo.getRequestUri()));
attributes.put("features", new FeaturesBean(socialEnabled, eventsEnabled, passwordUpdateSupported)); attributes.put("features", new FeaturesBean(socialEnabled, eventsEnabled, passwordUpdateSupported));
@@ -132,7 +127,7 @@ public class FreeMarkerAccountProvider implements AccountProvider {
attributes.put("totp", new TotpBean(user, baseUri)); attributes.put("totp", new TotpBean(user, baseUri));
break; break;
case SOCIAL: case SOCIAL:
attributes.put("social", new AccountSocialBean(session, realm, user, uriInfo.getBaseUri(), stateChecker)); attributes.put("social", new AccountSocialBean(session, realm, user, uriInfo.getBaseUri()));
break; break;
case LOG: case LOG:
attributes.put("log", new LogBean(events)); attributes.put("log", new LogBean(events));
@@ -217,12 +212,6 @@ public class FreeMarkerAccountProvider implements AccountProvider {
return this; return this;
} }
@Override
public AccountProvider setStateChecker(String stateChecker) {
this.stateChecker = stateChecker;
return this;
}
@Override @Override
public AccountProvider setFeatures(boolean socialEnabled, boolean eventsEnabled, boolean passwordUpdateSupported) { public AccountProvider setFeatures(boolean socialEnabled, boolean eventsEnabled, boolean passwordUpdateSupported) {
this.socialEnabled = socialEnabled; this.socialEnabled = socialEnabled;
@@ -25,7 +25,7 @@ public class AccountSocialBean {
private final boolean removeLinkPossible; private final boolean removeLinkPossible;
private final KeycloakSession session; private final KeycloakSession session;
public AccountSocialBean(KeycloakSession session, RealmModel realm, UserModel user, URI baseUri, String stateChecker) { public AccountSocialBean(KeycloakSession session, RealmModel realm, UserModel user, URI baseUri) {
this.session = session; this.session = session;
URI accountSocialUpdateUri = Urls.accountSocialUpdate(baseUri, realm.getName()); URI accountSocialUpdateUri = Urls.accountSocialUpdate(baseUri, realm.getName());
this.socialLinks = new LinkedList<SocialLinkEntry>(); this.socialLinks = new LinkedList<SocialLinkEntry>();
@@ -44,11 +44,7 @@ public class AccountSocialBean {
availableLinks++; availableLinks++;
} }
String action = socialLink != null ? "remove" : "add"; String action = socialLink != null ? "remove" : "add";
String actionUrl = UriBuilder.fromUri(accountSocialUpdateUri) String actionUrl = UriBuilder.fromUri(accountSocialUpdateUri).queryParam("action", action).queryParam("provider_id", socialProviderId).build().toString();
.queryParam("action", action)
.queryParam("provider_id", socialProviderId)
.queryParam("stateChecker", stateChecker)
.build().toString();
SocialLinkEntry entry = new SocialLinkEntry(socialLink, provider.getName(), actionUrl); SocialLinkEntry entry = new SocialLinkEntry(socialLink, provider.getName(), actionUrl);
this.socialLinks.add(entry); this.socialLinks.add(entry);
@@ -44,8 +44,6 @@ public class SessionsBean {
this.session = session; this.session = session;
} }
public String getId() {return session.getId(); }
public String getIpAddress() { public String getIpAddress() {
return session.getIpAddress(); return session.getIpAddress();
} }
@@ -16,15 +16,13 @@ public class UrlBean {
private URI baseURI; private URI baseURI;
private URI baseQueryURI; private URI baseQueryURI;
private URI currentURI; private URI currentURI;
private String stateChecker;
public UrlBean(RealmModel realm, Theme theme, URI baseURI, URI baseQueryURI, URI currentURI, String stateChecker) { public UrlBean(RealmModel realm, Theme theme, URI baseURI, URI baseQueryURI, URI currentURI) {
this.realm = realm.getName(); this.realm = realm.getName();
this.theme = theme; this.theme = theme;
this.baseURI = baseURI; this.baseURI = baseURI;
this.baseQueryURI = baseQueryURI; this.baseQueryURI = baseQueryURI;
this.currentURI = currentURI; this.currentURI = currentURI;
this.stateChecker = stateChecker;
} }
public String getAccessUrl() { public String getAccessUrl() {
@@ -56,11 +54,11 @@ public class UrlBean {
} }
public String getSessionsLogoutUrl() { public String getSessionsLogoutUrl() {
return Urls.accountSessionsLogoutPage(baseQueryURI, realm, stateChecker).toString(); return Urls.accountSessionsLogoutPage(baseQueryURI, realm).toString();
} }
public String getTotpRemoveUrl() { public String getTotpRemoveUrl() {
return Urls.accountTotpRemove(baseQueryURI, realm, stateChecker).toString(); return Urls.accountTotpRemove(baseQueryURI, realm).toString();
} }
public String getLogoutUrl() { public String getLogoutUrl() {
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-forms-parent</artifactId> <artifactId>keycloak-forms-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent> <parent>
<artifactId>keycloak-forms-parent</artifactId> <artifactId>keycloak-forms-parent</artifactId>
<groupId>org.keycloak</groupId> <groupId>org.keycloak</groupId>
<version>1.0-final</version> <version>1.0-rc-2</version>
<relativePath>../pom.xml</relativePath> <relativePath>../pom.xml</relativePath>
</parent> </parent>
<modelVersion>4.0.0</modelVersion> <modelVersion>4.0.0</modelVersion>
@@ -12,8 +12,6 @@
<form action="${url.accountUrl}" class="form-horizontal" method="post"> <form action="${url.accountUrl}" class="form-horizontal" method="post">
<input type="hidden" id="stateChecker" name="stateChecker" value="${stateChecker}">
<div class="form-group"> <div class="form-group">
<div class="col-sm-2 col-md-2"> <div class="col-sm-2 col-md-2">
<label for="username" class="control-label">${rb.username}</label> <label for="username" class="control-label">${rb.username}</label>
@@ -23,8 +23,6 @@
</div> </div>
</#if> </#if>
<input type="hidden" id="stateChecker" name="stateChecker" value="${stateChecker}">
<div class="form-group"> <div class="form-group">
<div class="col-sm-2 col-md-2"> <div class="col-sm-2 col-md-2">
<label for="password-new" class="control-label">${rb.passwordNew}</label> <label for="password-new" class="control-label">${rb.passwordNew}</label>
View File
File mode changed.
@@ -36,7 +36,6 @@
<hr/> <hr/>
<form action="${url.totpUrl}" class="form-horizontal" method="post"> <form action="${url.totpUrl}" class="form-horizontal" method="post">
<input type="hidden" id="stateChecker" name="stateChecker" value="${stateChecker}">
<div class="form-group"> <div class="form-group">
<div class="col-sm-2 col-md-2"> <div class="col-sm-2 col-md-2">
<label for="totp" class="control-label">${rb.authenticatorCode}</label> <label for="totp" class="control-label">${rb.authenticatorCode}</label>
@@ -17,6 +17,8 @@
<script src="lib/angular/angular-route.js"></script> <script src="lib/angular/angular-route.js"></script>
<script src="lib/angular/ui-bootstrap-tpls-0.11.0.js"></script> <script src="lib/angular/ui-bootstrap-tpls-0.11.0.js"></script>
<script src="lib/jquery/jquery.idletimer.js" type="text/javascript"></script>
<script src="lib/jquery/jquery.idletimeout.js" type="text/javascript"></script>
<script src="lib/angular/select2.js" type="text/javascript"></script> <script src="lib/angular/select2.js" type="text/javascript"></script>
<script src="lib/fileupload/angular-file-upload.min.js"></script> <script src="lib/fileupload/angular-file-upload.min.js"></script>
<script src="lib/filesaver/FileSaver.js"></script> <script src="lib/filesaver/FileSaver.js"></script>
@@ -73,5 +75,28 @@
</div> </div>
</div> </div>
<script type="text/javascript">
$.idleTimeout('#idletimeout', '#idletimeout a', {
idleAfter: 300,
pollingInterval: 60,
// keepAliveURL: authUrl + '/admin/keepalive', would need to change this path
serverResponseEquals: '',
failedRequests: 1,
onTimeout: function(){
$(this).slideUp();
logout();
},
onIdle: function(){
$(this).slideDown(); // show the warning bar
},
onCountdown: function( counter ){
$(this).find("span").html( counter ); // update the counter
},
onResume: function(){
$(this).slideUp(); // hide the warning bar
}
});
</script>
</body> </body>
</html> </html>
@@ -4,9 +4,17 @@ var consoleBaseUrl = window.location.href;
consoleBaseUrl = consoleBaseUrl.substring(0, consoleBaseUrl.indexOf("/console")); consoleBaseUrl = consoleBaseUrl.substring(0, consoleBaseUrl.indexOf("/console"));
consoleBaseUrl = consoleBaseUrl + "/console"; consoleBaseUrl = consoleBaseUrl + "/console";
var configUrl = consoleBaseUrl + "/config"; var configUrl = consoleBaseUrl + "/config";
var logoutUrl = consoleBaseUrl + "/logout";
var auth = {}; var auth = {};
var authUrl = window.location.href.substring(0, window.location.href.indexOf('/admin/')); var logout = function(){
console.log('*** LOGOUT');
window.location = logoutUrl;
};
var authUrl = window.location.href;
authUrl = authUrl.substring(0, authUrl.indexOf('/admin/'));
var module = angular.module('keycloak', [ 'keycloak.services', 'keycloak.loaders', 'ui.bootstrap', 'ui.select2', 'angularFileUpload' ]); var module = angular.module('keycloak', [ 'keycloak.services', 'keycloak.loaders', 'ui.bootstrap', 'ui.select2', 'angularFileUpload' ]);
var resourceRequests = 0; var resourceRequests = 0;
@@ -33,22 +41,18 @@ angular.element(document).ready(function ($http) {
module.factory('authInterceptor', function($q, Auth) { module.factory('authInterceptor', function($q, Auth) {
return { return {
request: function (config) { request: function (config) {
if (!config.url.match(/.html$/)) { var deferred = $q.defer();
var deferred = $q.defer(); if (Auth.authz.token) {
if (Auth.authz.token) { Auth.authz.updateToken(5).success(function() {
Auth.authz.updateToken(5).success(function () { config.headers = config.headers || {};
config.headers = config.headers || {}; config.headers.Authorization = 'Bearer ' + Auth.authz.token;
config.headers.Authorization = 'Bearer ' + Auth.authz.token;
deferred.resolve(config); deferred.resolve(config);
}).error(function () { }).error(function() {
location.reload(); location.reload();
}); });
}
return deferred.promise;
} else {
return config;
} }
return deferred.promise;
} }
}; };
}); });
@@ -799,13 +803,14 @@ module.config(function($httpProvider) {
}); });
module.factory('errorInterceptor', function($q, $window, $rootScope, $location, Notifications, Auth) { module.factory('errorInterceptor', function($q, $window, $rootScope, $location,Notifications) {
return function(promise) { return function(promise) {
return promise.then(function(response) { return promise.then(function(response) {
return response; return response;
}, function(response) { }, function(response) {
if (response.status == 401) { if (response.status == 401) {
Auth.authz.logout(); console.log('session timeout?');
logout();
} else if (response.status == 403) { } else if (response.status == 403) {
Notifications.error("Forbidden"); Notifications.error("Forbidden");
} else if (response.status == 404) { } else if (response.status == 404) {
@@ -4,6 +4,8 @@ module.controller('GlobalCtrl', function($scope, $http, Auth, WhoAmI, Current, $
}; };
$scope.authUrl = authUrl; $scope.authUrl = authUrl;
$scope.logout = logout;
$scope.auth = Auth; $scope.auth = Auth;
WhoAmI.get(function (data) { WhoAmI.get(function (data) {
@@ -20,7 +20,7 @@
</a> </a>
<ul class="dropdown-menu"> <ul class="dropdown-menu">
<li><a href="{{authUrl}}/realms/{{auth.user.realm}}/account?referrer=security-admin-console">Manage Account</a></li> <li><a href="{{authUrl}}/realms/{{auth.user.realm}}/account?referrer=security-admin-console">Manage Account</a></li>
<li class="separator"><a href="" ng-click="auth.authz.logout()">Sign Out</a></li> <li class="separator"><a href="" ng-click="logout()">Sign Out</a></li>
</ul> </ul>
</li> </li>
</ul> </ul>
@@ -1,35 +0,0 @@
@import url("../lib/patternfly/css/patternfly.css");
@import url("../lib/select2-3.4.1/select2.css");
@import url("admin-console.css");
@import url("tables.css");
@import url("sprites.css");
.navbar-pf {
background-image: url('../img/header-bkgrnd.png');
border-top: 3px solid rgba(255, 255, 255, 0.15);
}
.navbar-pf .navbar-primary {
font-size: 13px;
background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,.4) 100%);
background-image: linear-gradient(to bottom, rgba(0,0,0,.1) 0%, rgba(0,0,0,.4) 100%);
}
.navbar-pf .navbar-header {
border-bottom: 1px solid rgba(255,255,255,.15);
}
.navbar-pf .navbar-primary li.dropdown.context > a,
.navbar-pf .navbar-primary li.dropdown.context > a:hover,
.navbar-pf .navbar-primary li.dropdown.context.open > a,
.navbar-pf .navbar-primary > .active > a,
.navbar-pf .navbar-primary > .active > a:hover{
background-color: rgba(0,0,0,0.1);
background-image: -webkit-linear-gradient(top, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%);
background-image: linear-gradient(to bottom, rgba(0,0,0,0.1) 0%, rgba(0,0,0,0.1) 100%);
border-bottom: none;
border-right-color: rgba(255,255,255,0.15);
border-top-color: rgba(255,255,255,0.05);
}
Loaded 100 of 190 files, more files were not shown because too many files have changed in this diff. Show more