Compare commits

...
100 Commits
Author SHA1 Message Date
Stian Thorgersen 1b4d682a0b Version bump 2014-09-18 13:24:54 +02:00
Stian Thorgersen 6f3132eafd Merge pull request #701 from stianst/master
KEYCLOAK-696 Display Keycloak version in admin console
2014-09-18 13:24:38 +02:00
Stian Thorgersen dcb5717154 KEYCLOAK-696 Display Keycloak version in admin console 2014-09-18 13:24:03 +02:00
Stian Thorgersen bfdb8d4e2d Merge pull request #700 from stianst/master
Removed info log statement
2014-09-18 12:38:48 +02:00
Stian Thorgersen 91fced3b87 Removed info log statement 2014-09-18 12:37:51 +02:00
Marek Posolda 825c475c7f Merge pull request #699 from mposolda/master
Admin console fixes, KEYCLOAK_REMEMBER_ME life changed to 1 year
2014-09-18 11:15:09 +02:00
mposolda 89471b7db1 KEYCLOAK-695 Let KEYCLOAK_REMEMBER_ME cookie to be valid for 1 year 2014-09-18 11:03:44 +02:00
mposolda 95233af485 KEYCLOAK-694 Fix JS error which could happen when creating application 2014-09-18 10:51:10 +02:00
mposolda fc37398235 KEYCLOAK-693 Hide top navigation when creating OAuth client 2014-09-18 10:50:18 +02:00
Marek Posolda 16ea18370d Merge pull request #698 from mposolda/master
Prefill login form just if rememberMe enabled for the realm
2014-09-17 08:59:00 +02:00
mposolda 1049bca433 Prefill login form just if rememberMe enabled for the realm 2014-09-17 08:54:29 +02:00
Marek Posolda 364174fb7e Merge pull request #697 from mposolda/master
Cookie & rememberMe fix. Fixing testsuite with mongo
2014-09-16 22:15:27 +02:00
mposolda 5352872b4b Use KEYCLOAK_REMEMBER_ME as hint to prefill login form. Change lifespan of KEYCLOAK_IDENTITY to maxSsoSessionLifespan 2014-09-16 22:09:27 +02:00
mposolda bd0887d18e Fixing testsuite for mongo 2014-09-16 20:02:30 +02:00
Marek Posolda 9a5f42039d Merge pull request #696 from mposolda/master
Added directive kcNavigationApplication and kcNavigationOauthClient. Hide Scope and Claims for bearer-only apps
2014-09-12 20:16:52 +02:00
mposolda ce8dd136bd Added directive kcNavigationApplication and kcNavigationOauthClient. Hide Scope and Claims for bearer-only apps 2014-09-12 20:15:11 +02:00
mposolda 1be2bff95f Typo 2014-09-12 16:57:02 +02:00
Stian Thorgersen 485ca9c90f Merge pull request #695 from stianst/master
KEYCLOAK-657 Set cache-control for keycloak.js and login-iframe
2014-09-12 13:47:20 +02:00
Stian Thorgersen 811cfd52c9 KEYCLOAK-657 Set cache-control for keycloak.js and login-iframe 2014-09-12 13:46:56 +02:00
Stian Thorgersen 5c1807eb2d Merge pull request #694 from stianst/master
Fixes to KEYCLOAK-682
2014-09-12 12:27:31 +02:00
Stian Thorgersen 7c15a70f53 Fixes to KEYCLOAK-682 2014-09-12 12:26:52 +02:00
Stian Thorgersen c9c525e942 Merge pull request #693 from stianst/master
KEYCLOAK-682 Only send logout admin action to clients associated with us...
2014-09-12 11:47:30 +02:00
Stian Thorgersen 5d141d4d8a KEYCLOAK-682 Only send logout admin action to clients associated with user session 2014-09-12 11:47:11 +02:00
Stian Thorgersen e96d6f0dfd Merge pull request #692 from stianst/master
Change version schema to match JBoss
2014-09-12 09:36:27 +02:00
Stian Thorgersen 423dc1b8a7 Change version schema to match JBoss 2014-09-12 09:35:08 +02:00
Marek Posolda ab080dcdd8 Merge pull request #691 from mposolda/master
Preserve form values in account mgmt after error. Allow valid email during registration or account mgmt
2014-09-11 20:57:27 +02:00
mposolda 6f173d4554 KEYCLOAK-678 Preserve form values in account mgmt after error 2014-09-11 20:54:48 +02:00
mposolda 649a40f58c KEYCLOAK-676 Validate email address format during registration or account mgmt 2014-09-11 20:05:00 +02:00
Stian Thorgersen d06668d39b Merge pull request #690 from stianst/master
KEYCLOAK-653 Add theme support to welcome-pages
2014-09-11 15:58:51 +02:00
Stian Thorgersen b23463a1d2 KEYCLOAK-653 Add theme support to welcome-pages 2014-09-11 15:58:29 +02:00
Stian Thorgersen 7f81032577 Merge pull request #689 from stianst/master
KEYCLOAK-680 Add/remove social-links through admin api
2014-09-11 12:10:23 +02:00
Stian Thorgersen 280cbf2174 KEYCLOAK-680 Add/remove social-links through admin api 2014-09-11 12:09:55 +02:00
Stian Thorgersen 228bb297c2 Merge pull request #688 from stianst/master
Added KEYCLOAK_DEV_PORT env variable for KeycloakServer
2014-09-11 11:05:53 +02:00
Stian Thorgersen f96e59d085 Added KEYCLOAK_DEV_PORT env variable for KeycloakServer 2014-09-11 11:05:29 +02:00
Stian Thorgersen 86300e7e86 Merge pull request #687 from stianst/master
Version bump
2014-09-11 09:29:37 +02:00
Stian Thorgersen 5dea07793b Version bump 2014-09-11 09:27:58 +02:00
Marek Posolda 5e51204114 Merge pull request #686 from mposolda/master
KEYCLOAK-674 Reduce info level logging in adapters
2014-09-10 16:04:48 +02:00
mposolda 4c0751c1a0 KEYCLOAK-674 Reduce info level logging in adapters 2014-09-10 16:02:22 +02:00
Marek Posolda ec1434c65e Merge pull request #685 from mposolda/master
Support for cors in PublicRealmResource
2014-09-10 13:16:21 +02:00
mposolda aa7bbeb11b Support for cors in PublicRealmResource 2014-09-10 13:05:53 +02:00
Marek Posolda 88a39dbaf7 Merge pull request #683 from mposolda/master
KEYCLOAK-670 allow ServerInfo to be available with cors
2014-09-10 10:52:33 +02:00
mposolda 52920119bd Ensure that ServerInfo request is authorized and add CORS support to it 2014-09-10 10:42:05 +02:00
mposolda 47ac358bb6 Fix timeouts in cors example 2014-09-10 10:42:04 +02:00
Stian Thorgersen 62aa2d7f65 Merge pull request #684 from stianst/master
Fix CRSF protection on Chrome, and add check if 'Referer' header
2014-09-10 10:34:49 +02:00
Stian Thorgersen 557de7690e Fix CRSF protection on Chrome, and add check if 'Referer' header 2014-09-10 10:32:56 +02:00
Bill Burke 4c8da3d614 Merge pull request #682 from patriot1burke/master
version bump
2014-09-09 13:35:39 -04:00
Bill Burke 3f539c6d5c version bump 2014-09-09 13:34:56 -04:00
Bill Burke 5b1d67f17d Merge pull request #681 from patriot1burke/master
change CSRF to random value
2014-09-09 13:27:59 -04:00
Bill Burke e3e32982a0 change CSRF to random value 2014-09-09 13:27:34 -04:00
Bill Burke b771cd30e7 Merge pull request #680 from patriot1burke/master
nolog CORS exception
2014-09-09 12:54:55 -04:00
Bill Burke ac29db51e5 nolog CORS exception 2014-09-09 12:51:55 -04:00
Bill Burke 6e3770f04a Merge pull request #679 from patriot1burke/master
CSRF
2014-09-09 12:07:29 -04:00
Bill Burke d0a3a04d34 CSRF 2014-09-09 12:06:48 -04:00
Stian Thorgersen c5662020d8 Merge pull request #678 from stianst/master
Moved logo-example themes to examples/themes
2014-09-09 14:09:58 +02:00
Stian Thorgersen fea0d1af66 Moved logo-example themes to examples/themes 2014-09-09 14:09:32 +02:00
Stian Thorgersen 30cd28d288 Merge pull request #677 from stianst/master
KEYCLOAK-668 Make sure keycloak.js doesn't send multiple concurrent requ...
2014-09-09 13:46:21 +02:00
Stian Thorgersen c475721dab KEYCLOAK-668 Make sure keycloak.js doesn't send multiple concurrent requests to refresh the token 2014-09-09 13:45:55 +02:00
Stian Thorgersen 839069ca15 Merge pull request #676 from stianst/master
Fixes to admin console random logout
2014-09-09 11:02:19 +02:00
Stian Thorgersen 09860f1ee1 Fix test 2014-09-09 11:01:24 +02:00
Stian Thorgersen a1b6378bef KEYCLOAK-667 Remove client-side idle timeout from admin console - with sso idle timeout we have a server-side mechanism for this 2014-09-09 11:01:24 +02:00
Stian Thorgersen 3530fa6259 KEYCLOAK-666 Update session last refreshed on every token refresh 2014-09-09 11:01:24 +02:00
Bill Burke d22afd78e6 Merge pull request #675 from patriot1burke/master
doc update
2014-09-08 09:09:07 -04:00
Bill Burke f1986093e6 doc update 2014-09-08 09:07:51 -04:00
Stian Thorgersen 6c5477bc02 Merge pull request #674 from stianst/master
Minor fixes to theme docs
2014-09-08 14:59:34 +02:00
Stian Thorgersen ae6fd458e8 Minor fixes to theme docs 2014-09-08 14:59:09 +02:00
Stian Thorgersen cdda48d895 Merge pull request #673 from stianst/master
Typo fix in docs
2014-09-08 10:25:18 +02:00
Stian Thorgersen 556314ae15 Typo fix in docs 2014-09-08 10:24:47 +02:00
Stian Thorgersen a2845fa0b4 Merge pull request #672 from stianst/master
Added instruction to manually configure and deploy the unconfigured demo
2014-09-03 13:32:33 +02:00
Stian Thorgersen 8c4a3374d3 Added instruction to manually configure and deploy the unconfigured demo 2014-09-03 13:20:58 +02:00
Stian Thorgersen b97106b750 Adding changes to examples overview readme 2014-09-03 13:18:14 +02:00
Stian Thorgersen 7907abd206 Merge pull request #671 from stianst/master
Added README.md with Overview of all examples
2014-09-03 11:22:42 +02:00
Stian Thorgersen 090871f8b9 Added README.md with Overview of all examples 2014-09-03 11:22:08 +02:00
Stian Thorgersen 0baf12c0ef Merge pull request #670 from stianst/master
Updates to server-installation docs
2014-09-03 10:13:36 +02:00
Stian Thorgersen 1599371ee5 Updates to server-installation docs 2014-09-03 10:13:05 +02:00
Stian Thorgersen 3bc27ef366 Merge pull request #669 from stianst/master
Fix AccountTest.viewLog test
2014-09-03 08:53:56 +02:00
Stian Thorgersen d5c5cc8321 Fix AccountTest.viewLog test 2014-09-03 08:53:02 +02:00
Bill Burke aea00fc574 Merge pull request #668 from patriot1burke/master
admin theme refactor
2014-09-02 11:37:32 -04:00
Bill Burke e9dc8b2460 refactor admin theme 2014-09-02 11:36:59 -04:00
Bill Burke eaed199b20 add logo example theme 2014-09-02 11:11:26 -04:00
Marek Posolda f7fcefc11c Merge pull request #667 from mposolda/master
KEYCLOAK-659 Export current version number during export
2014-09-02 17:09:10 +02:00
mposolda 1f0dcbddbe KEYCLOAK-659 Export current version number during export 2014-09-02 17:06:58 +02:00
Stian Thorgersen 9af0743883 Merge pull request #666 from stianst/master
Updated docs to inherit project version from keycloak-parent
2014-09-02 14:07:24 +02:00
Stian Thorgersen 7d4863783c Use keycloak-parent in docbook to inherit project version 2014-09-02 13:57:23 +02:00
Stian Thorgersen d87718f768 Inject project version from pom 2014-09-02 13:22:15 +02:00
Stian Thorgersen c7ba6159b5 Merge pull request #665 from stianst/master
Doc fix
2014-09-02 12:52:42 +02:00
Stian Thorgersen b43909aff1 Doc fix 2014-09-02 12:52:22 +02:00
Marek Posolda 87d9a5422d Merge pull request #664 from mposolda/master
Use stronger passwords in LDAP tests due to password policy on MSAD2012
2014-09-02 12:49:34 +02:00
mposolda 44937d33ad Use stronger passwords in LDAP tests due to password policy on MSAD2012 2014-09-02 12:43:14 +02:00
Stian Thorgersen b561080f3a Merge pull request #663 from stianst/master
Fix search for users by attribute on mongo
2014-09-02 11:52:15 +02:00
Stian Thorgersen d905ce12e3 Fix search for users by attribute on mongo 2014-09-02 11:51:29 +02:00
Marek Posolda 7040bd1c51 Merge pull request #662 from mposolda/master
Fix SyncProvidersTest with ActiveDirectory
2014-09-02 11:12:43 +02:00
mposolda cd91a29a89 Fix SyncProvidersTest with ActiveDirectory 2014-09-02 11:06:31 +02:00
Stian Thorgersen b1b452815a Merge pull request #661 from stianst/master
KEYCLOAK-656 Remove login-status-iframe from dist
2014-09-02 10:54:52 +02:00
Stian Thorgersen 59d66dd20e KEYCLOAK-656 Remove login-status-iframe from dist 2014-09-02 10:54:26 +02:00
Stian Thorgersen 0763d0d9d6 Merge pull request #660 from stianst/master
KEYCLOAK-658 Fix searching for users
2014-09-02 10:02:08 +02:00
Stian Thorgersen 8c8c44e50f KEYCLOAK-658 Fix searching for users 2014-09-02 10:01:44 +02:00
Marek Posolda 14b1941454 Merge pull request #659 from mposolda/master
Added more props to LDAPEmbeddedServer to allow automated test with Acti...
2014-09-01 20:54:49 +02:00
mposolda e52811ac28 Added more props to LDAPEmbeddedServer to allow automated test with ActiveDirectory 2014-09-01 20:43:14 +02:00
Stian Thorgersen 4f3a980f8b Merge pull request #658 from stianst/master
Version bump
2014-09-01 10:17:31 +02:00
Stian Thorgersen 05a1fc1ded Version bump 2014-09-01 10:17:00 +02:00
252 changed files with 1585 additions and 978 deletions

No files matched your search

+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
</parent>
<name>Connections Parent</name>
<description/>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+3 -1
View File
@@ -14,7 +14,7 @@ public class Version {
public static String VERSION;
public static String BUILD_TIME;
public static final String UNKNOWN = "UNKNOWN";
public static final Version SINGLETON = new Version();
public static final Version SINGLETON;
private final String version = VERSION;
private final String buildTime = BUILD_TIME;
@@ -30,6 +30,8 @@ public class Version {
VERSION=UNKNOWN;
BUILD_TIME=UNKNOWN;
}
SINGLETON = new Version();
}
@JsonProperty("version")
@@ -0,0 +1,19 @@
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>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+2 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -88,6 +88,7 @@
<artifactId>keycloak-js-adapter</artifactId>
<version>${project.version}</version>
<outputDirectory>${project.build.directory}/unpacked/js-adapter</outputDirectory>
<includes>*.js</includes>
</artifactItem>
</artifactItems>
<excludes>**/welcome-content/*</excludes>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
+1 -8
View File
@@ -8,7 +8,6 @@
<exclude name="**/*.iml"/>
<exclude name="**/*.unconfigured"/>
<exclude name="**/subsystem-config.xml"/>
<exclude name="**/README.md.overview"/>
</fileset>
</copy>
<copy todir="target/examples/cordova" overwrite="true">
@@ -17,7 +16,6 @@
<exclude name="**/*.iml"/>
<exclude name="**/*.unconfigured"/>
<exclude name="**/subsystem-config.xml"/>
<exclude name="**/README.md.overview"/>
</fileset>
</copy>
<copy todir="target/examples/providers" overwrite="true">
@@ -26,7 +24,6 @@
<exclude name="**/*.iml"/>
<exclude name="**/*.unconfigured"/>
<exclude name="**/subsystem-config.xml"/>
<exclude name="**/README.md.overview"/>
</fileset>
</copy>
<copy todir="target/examples/js-console" overwrite="true">
@@ -35,7 +32,6 @@
<exclude name="**/*.iml"/>
<exclude name="**/*.unconfigured"/>
<exclude name="**/subsystem-config.xml"/>
<exclude name="**/README.md.overview"/>
</fileset>
</copy>
<copy todir="target/examples/themes" overwrite="true">
@@ -44,7 +40,6 @@
<exclude name="**/*.iml"/>
<exclude name="**/*.unconfigured"/>
<exclude name="**/subsystem-config.xml"/>
<exclude name="**/README.md.overview"/>
</fileset>
</copy>
<copy todir="target/examples/preconfigured-demo" overwrite="true">
@@ -53,7 +48,6 @@
<exclude name="**/*.iml"/>
<exclude name="**/*.unconfigured"/>
<exclude name="**/subsystem-config.xml"/>
<exclude name="**/README.md.overview"/>
</fileset>
</copy>
<copy todir="target/examples/unconfigured-demo" overwrite="true">
@@ -65,10 +59,9 @@
<exclude name="**/target/**"/>
<exclude name="**/*.iml"/>
<exclude name="**/README.md"/>
<exclude name="**/README.md.overview"/>
</fileset>
</copy>
<copy file="../../examples/demo-template/README.md.overview" tofile="target/examples/README.md"/>
<copy file="../../examples/README.md" 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/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"/>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -30,7 +30,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>Distribution</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
+2 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
@@ -89,6 +89,7 @@
<artifactId>keycloak-js-adapter</artifactId>
<version>${project.version}</version>
<outputDirectory>${project.build.directory}/unpacked/js-adapter</outputDirectory>
<includes>*.js</includes>
</artifactItem>
</artifactItems>
</configuration>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
+8 -4
View File
@@ -1,15 +1,19 @@
<project xmlns="http://maven.apache.org/POM/4.0.0"
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">
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>org.keycloak</groupId>
<artifactId>keycloak-reference-guide-${translation}</artifactId>
<version>1.0-rc-2-SNAPSHOT</version>
<packaging>jdocbook</packaging>
<name>Keycloak Reference Guide (${translation})</name>
<description/>
<modelVersion>4.0.0</modelVersion>
<repositories>
<repository>
<id>jboss</id>
+1 -1
View File
@@ -38,7 +38,7 @@
<bookinfo>
<title>Keycloak Reference Guide</title>
<subtitle>SSO for Web Apps and REST Services</subtitle>
<releaseinfo>1.0-rc-2-SNAPSHOT</releaseinfo>
<releaseinfo>&project.version;</releaseinfo>
</bookinfo>
<toc/>
@@ -152,7 +152,7 @@
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
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 union
token specific to that application. The role mappings contained within the token are the intersection
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
for by them.
@@ -11,7 +11,7 @@
"realm-public-key" : "MIGfMA0GCSqGSIb3D...31LwIDAQAB",
"auth-server-url" : "https://localhost:8443/auth",
"ssl-required" : "external",
"user-resource-role-mappings" : false,
"use-resource-role-mappings" : false,
"enable-cors" : true,
"cors-max-age" : 1000,
"cors-allowed-methods" : [ "POST", "PUT", "DELETE", "GET" ],
@@ -101,7 +101,7 @@
</listitem>
</varlistentry>
<varlistentry>
<term>user-resource-role-mappings</term>
<term>use-resource-role-mappings</term>
<listitem>
<para>
If set to true, the adapter will look inside the token for application level role mappings for
@@ -8,11 +8,11 @@
<itemizedlist>
<listitem>
keycloak-appliance-dist-all-1.0-rc-2-SNAPSHOT.zip
keycloak-appliance-dist-all-&project.version;.zip
</listitem>
<listitem>
keycloak-war-dist-all-1.0-rc-2-SNAPSHOT.zip
keycloak-war-dist-all-&project.version;.zip
</listitem>
</itemizedlist>
@@ -22,7 +22,7 @@
<title>Appliance Install</title>
<para>
The
<literal>keycloak-appliance-dist-all.zip</literal>
<literal>keycloak-appliance-dist-all-&project.version;.zip</literal>
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
directory layout looks
@@ -31,7 +31,7 @@
<para>
<programlisting>
keycloak-appliance-dist-all-1.0-rc-2-SNAPSHOT/
keycloak-appliance-dist-all-&project.version;/
keycloak/
bin/
standalone.sh
@@ -42,9 +42,9 @@ keycloak-appliance-dist-all-1.0-rc-2-SNAPSHOT/
keycloak-server.json
themes/
adapters/
keycloak-as7-adapter-dist-1.0-rc-2-SNAPSHOT.zip
keycloak-eap6-adapter-dist-1.0-rc-2-SNAPSHOT.zip
keycloak-wildfly-adapter-dist-1.0-rc-2-SNAPSHOT.zip
keycloak-as7-adapter-dist-&project.version;.zip
keycloak-eap6-adapter-dist-&project.version;.zip
keycloak-wildfly-adapter-dist-&project.version;.zip
examples/
docs/
</programlisting>
@@ -67,7 +67,7 @@ keycloak-appliance-dist-all-1.0-rc-2-SNAPSHOT/
<title>WAR Distribution Installation</title>
<para>
The
<literal>keycloak-war-dist-all.zip</literal>
<literal>keycloak-war-dist-all-&project.version;.zip</literal>
contains
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
@@ -79,7 +79,7 @@ keycloak-appliance-dist-all-1.0-rc-2-SNAPSHOT/
</para>
<para>
<programlisting>
keycloak-war-dist-all-1.0-rc-2-SNAPSHOT/
keycloak-war-dist-all-&project.version;/
deployments/
auth-server.war/
keycloak-ds.xml
@@ -87,9 +87,9 @@ keycloak-war-dist-all-1.0-rc-2-SNAPSHOT/
keycloak-server.json
themes/
adapters/
keycloak-as7-adapter-dist-1.0-rc-2-SNAPSHOT.zip
keycloak-eap6-adapter-dist-1.0-rc-2-SNAPSHOT.zip
keycloak-wildfly-adapter-dist-1.0-rc-2-SNAPSHOT.zip
keycloak-as7-adapter-dist-&project.version;.zip
keycloak-eap6-adapter-dist-&project.version;.zip
keycloak-wildfly-adapter-dist-&project.version;.zip
examples/
docs/
</programlisting>
@@ -101,7 +101,7 @@ keycloak-war-dist-all-1.0-rc-2-SNAPSHOT/
</para>
<para>
<programlisting>
$ cd keycloak-war-dist-all-1.0-rc-2-SNAPSHOT
$ cd keycloak-war-dist-all-&project.version;
$ cp -r deployments $JBOSS_HOME/standalone
$ cp -r configuration $JBOSS_HOME/standalone
</programlisting>
@@ -129,7 +129,7 @@ keycloak-war-dist-all-1.0-rc-2-SNAPSHOT/
<itemizedlist>
<listitem>
Configuring keycloak to use a production database.
Configuring Keycloak to use a production database.
</listitem>
<listitem>
@@ -144,14 +144,14 @@ keycloak-war-dist-all-1.0-rc-2-SNAPSHOT/
<section>
<title>Relational Database Configuration</title>
<para>
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>
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>
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.
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.
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>
<programlisting><![CDATA[
@@ -180,8 +180,8 @@ keycloak-war-dist-all-1.0-rc-2-SNAPSHOT/
<xa-datasource-class>org.h2.jdbcx.JdbcDataSource</xa-datasource-class>
</driver>
</drivers>
</datasources>
</subsystem>
</datasources>
</subsystem>
]]>
</programlisting>
</para>
@@ -206,16 +206,6 @@ keycloak-war-dist-all-1.0-rc-2-SNAPSHOT/
]]></programlisting>
Possible configuration options are:
<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>
<term>dataSource</term>
<listitem>
@@ -265,6 +255,16 @@ keycloak-war-dist-all-1.0-rc-2-SNAPSHOT/
</para>
</listitem>
</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>
For more info about Hibernate properties, see <ulink url="http://hibernate.org/orm/documentation/">Hibernate and JPA documentation</ulink> .
</para>
@@ -350,6 +350,9 @@ keycloak-war-dist-all-1.0-rc-2-SNAPSHOT/
<programlisting><![CDATA[
"eventsStore": {
"provider": "mongo",
"mongo": {
"exclude-events": [ "REFRESH_TOKEN" ]
}
},
"realm": {
@@ -358,7 +361,7 @@ keycloak-war-dist-all-1.0-rc-2-SNAPSHOT/
"user": {
"provider": "mongo"
}
},
]]></programlisting>
And at the end of the file add the snippet like this where you can configure details about your Mongo database:
@@ -668,17 +671,6 @@ keycloak-war-dist-all-1.0-rc-2-SNAPSHOT/
</web-app>]]></programlisting>
</para>
</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>
+7 -5
View File
@@ -22,6 +22,13 @@
the list and the status should be <literal>ON</literal>).
</para>
</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>
<para>
Now click <literal>Credentials</literal> in the sidebar on the left. Then click
@@ -40,9 +47,4 @@
</para>
</listitem>
</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>
@@ -10,9 +10,7 @@
<title>Configure theme</title>
<para>
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. 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.
from the drop-down box in the top left corner. Under <literal>Settings</literal> click on <literal>Theme</literal>.
</para>
</section>
@@ -56,7 +54,7 @@
templates.
</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 contents of the file should be:
</para>
@@ -79,6 +77,7 @@
<programlisting>styles=css/styles.css css/more-styles.css</programlisting>
</section>
<section>
<title>Scripts</title>
<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>)
inside your theme folder. Then registering it in <literal>theme.properties</literal> by adding:
@@ -154,7 +153,7 @@
</para>
<para>
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-1.0-rc-2-SNAPSHOT.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-&project.version;.jar</literal>
or disable it with the system property <literal>org.keycloak.account.freemarker.FreeMarkerAccountProviderFactory</literal>.
</para>
</section>
@@ -167,7 +166,7 @@
</para>
<para>
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-1.0-rc-2-SNAPSHOT.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-&project.version;.jar</literal>
or disable it with the system property <literal>org.keycloak.login.freemarker.FreeMarkerLoginFormsProviderFactory</literal>.
</para>
</section>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-events-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-events-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-events-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-events-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-events-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
+48
View File
@@ -0,0 +1,48 @@
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>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -34,6 +34,7 @@
</tbody>
</table>
</div>
<hr />
<div>
<h2><span>Realm Roles</span></h2>
<button type="submit" data-ng-click="loadRoles()">load Roles</button>
@@ -52,6 +53,34 @@
</tbody>
</table>
</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>
</body>
</html>
@@ -58,6 +58,20 @@ 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;
});
+5 -3
View File
@@ -1,9 +1,11 @@
{
"realm": "cors",
"enabled": true,
"accessTokenLifespan": 3000,
"accessCodeLifespan": 10,
"accessCodeLifespanUserAction": 6000,
"accessTokenLifespan": 60,
"accessCodeLifespan": 60,
"accessCodeLifespanUserAction": 300,
"ssoSessionIdleTimeout": 600,
"ssoSessionMaxLifespan": 36000,
"sslRequired": "external",
"registrationAllowed": false,
"social": false,
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<name>Examples</name>
-10
View File
@@ -1,10 +0,0 @@
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).
+128 -1
View File
@@ -1,10 +1,137 @@
Unconfigured Examples
===================================
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 the online screencast tutorials at
configuration has been removed. Use this project in conjunction with instructions below and/or the online screencast tutorials at
[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>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<name>Examples</name>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>Examples</name>
@@ -3,7 +3,7 @@
<parent>
<artifactId>examples-providers-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>Event Listener System.out Example</name>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>examples-providers-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>Event Store In-Mem Example</name>
@@ -3,7 +3,7 @@
<parent>
<artifactId>examples-providers-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>Properties Authentication Provider Example</name>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>examples-pom</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<name>Provider Examples</name>
+32 -3
View File
@@ -1,4 +1,33 @@
Example Login Theme
===================
Example Themes
==============
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.
Sunrise Login Theme
-------------------
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, admin console and welcome pages 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/`
* `admin/logo-example` to `standalone/configuration/themes/admin/`
* `welcome/logo-example` to `standalone/configuration/themes/welcome/`
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.
To change the theme for the welcome pages open `standalone/configuration/keycloak-server.json` find the config for `theme` and add 'welcomeTheme':
"theme": {
...
"welcomeTheme": "logo-example"
},
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`).
@@ -0,0 +1,8 @@
.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;
}
+4
View File
@@ -0,0 +1,4 @@
parent=keycloak
import=common/keycloak
styles= ../patternfly/lib/patternfly/css/patternfly.css ../patternfly/css/account.css ../keycloak/css/account.css css/account.css
@@ -0,0 +1,8 @@
.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.

After

Width:  |  Height:  |  Size: 2.9 KiB

+2
View File
@@ -0,0 +1,2 @@
parent=keycloak
import=common/keycloak
@@ -0,0 +1,9 @@
#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.

After

Width:  |  Height:  |  Size: 2.9 KiB

+4
View File
@@ -0,0 +1,4 @@
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
+50
View File
@@ -0,0 +1,50 @@
<!--
~ JBoss, Home of Professional Open Source.
~ Copyright (c) 2011, Red Hat, Inc., and individual contributors
~ as indicated by the @author tags. See the copyright.txt file in the
~ distribution for a full listing of individual contributors.
~
~ This is free software; you can redistribute it and/or modify it
~ under the terms of the GNU Lesser General Public License as
~ published by the Free Software Foundation; either version 2.1 of
~ the License, or (at your option) any later version.
~
~ This software is distributed in the hope that it will be useful,
~ but WITHOUT ANY WARRANTY; without even the implied warranty of
~ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
~ Lesser General Public License for more details.
~
~ You should have received a copy of the GNU Lesser General Public
~ License along with this software; if not, write to the Free
~ Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA
~ 02110-1301 USA, or see the FSF site: http://www.fsf.org.
-->
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Welcome to Keycloak</title>
<link rel="shortcut icon" href="welcome-content/favicon.ico" type="image/x-icon">
<link rel="StyleSheet" href="welcome-content/keycloak.css" type="text/css">
</head>
<body>
<div class="wrapper">
<div class="content">
<div class="logo">
<img src="welcome-content/red-hat-logo.png" alt="Red Hat" border="0" />
</div>
<h1>Welcome to Keycloak</h1>
<h3>Your Keycloak is running.</h3>
<p><a href="http://www.keycloak.org/docs">Documentation</a> | <a href="admin/">Administration Console</a> </p>
<p><a href="http://www.keycloak.org">Keycloak Project</a> |
<a href="https://lists.jboss.org/mailman/listinfo/keycloak-user">Mailing List</a> |
<a href="https://issues.jboss.org/browse/KEYCLOAK">Report an issue</a></p>
<p class="logos"><a href="http://www.jboss.org"><img src="welcome-content/jboss_community.png" alt="JBoss and JBoss Community" width="254" height="31" border="0"></a></p>
</div>
</div>
</body>
</html>
Binary file not shown.

After

Width:  |  Height:  |  Size: 2.9 KiB

+1
View File
@@ -0,0 +1 @@
parent=keycloak
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-export-import-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -1,6 +1,7 @@
package org.keycloak.exportimport.util;
import org.jboss.logging.Logger;
import org.keycloak.Version;
import org.keycloak.exportimport.ExportImportConfig;
import org.keycloak.exportimport.ExportProvider;
import org.keycloak.exportimport.UsersExportStrategy;
@@ -37,12 +38,19 @@ public abstract class MultipleStepsExportProvider implements ExportProvider {
});
for (RealmModel realm : holder.realms) {
exportRealm(factory, realm.getName());
exportRealmImpl(factory, realm.getName());
}
writeVersion("version.json", Version.SINGLETON);
}
@Override
public void exportRealm(KeycloakSessionFactory factory, final String realmName) throws IOException {
public void exportRealm(KeycloakSessionFactory factory, 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 int usersPerFile = ExportImportConfig.getUsersPerFile();
final UsersHolder usersHolder = new UsersHolder();
@@ -102,6 +110,8 @@ public abstract class MultipleStepsExportProvider implements ExportProvider {
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 {
List<RealmModel> realms;
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-export-import-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -1,5 +1,6 @@
package org.keycloak.exportimport.dir;
import org.keycloak.Version;
import org.keycloak.exportimport.util.ExportUtils;
import org.keycloak.exportimport.util.MultipleStepsExportProvider;
import org.keycloak.models.KeycloakSession;
@@ -68,6 +69,13 @@ public class DirExportProvider extends MultipleStepsExportProvider {
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
public void close() {
}
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-export-import-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-export-import-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -4,6 +4,7 @@ import de.idyl.winzipaes.AesZipFileEncrypter;
import de.idyl.winzipaes.impl.AESEncrypter;
import de.idyl.winzipaes.impl.AESEncrypterBC;
import org.jboss.logging.Logger;
import org.keycloak.Version;
import org.keycloak.exportimport.util.ExportUtils;
import org.keycloak.exportimport.util.MultipleStepsExportProvider;
import org.keycloak.models.KeycloakSession;
@@ -47,17 +48,24 @@ public class ZipExportProvider extends MultipleStepsExportProvider {
protected void writeRealm(String fileName, RealmRepresentation rep) throws IOException {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
JsonSerialization.mapper.writeValue(stream, rep);
byte[] byteArray = stream.toByteArray();
ByteArrayInputStream bis = new ByteArrayInputStream(byteArray);
this.encrypter.add(fileName, bis, this.password);
writeStream(fileName, stream);
}
@Override
protected void writeUsers(String fileName, KeycloakSession session, RealmModel realm, List<UserModel> users) throws IOException {
ByteArrayOutputStream stream = new ByteArrayOutputStream();
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();
ByteArrayInputStream bis = new ByteArrayInputStream(byteArray);
this.encrypter.add(fileName, bis, this.password);
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -3,7 +3,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -45,7 +45,6 @@ public class LDAPUtils {
picketlinkUser.setFirstName(firstName);
picketlinkUser.setLastName(lastName);
picketlinkUser.setEmail(email);
picketlinkUser.setAttribute(new Attribute("fullName", getFullName(username, firstName, lastName)));
idmManager.update(picketlinkUser);
return picketlinkUser;
}
+1 -1
View File
@@ -5,7 +5,7 @@
<parent>
<artifactId>keycloak-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-forms-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
+5
View File
@@ -6,6 +6,7 @@ import org.keycloak.models.UserModel;
import org.keycloak.models.UserSessionModel;
import org.keycloak.provider.Provider;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriInfo;
import java.util.List;
@@ -27,6 +28,8 @@ public interface AccountProvider extends Provider {
AccountProvider setUser(UserModel user);
AccountProvider setProfileFormData(MultivaluedMap<String, String> formData);
AccountProvider setStatus(Response.Status status);
AccountProvider setRealm(RealmModel realm);
@@ -39,5 +42,7 @@ public interface AccountProvider extends Provider {
AccountProvider setPasswordSet(boolean passwordSet);
AccountProvider setStateChecker(String stateChecker);
AccountProvider setFeatures(boolean social, boolean events, boolean passwordUpdateSupported);
}
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-forms-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -25,6 +25,7 @@ import org.keycloak.models.UserModel;
import org.keycloak.models.UserSessionModel;
import javax.ws.rs.core.MediaType;
import javax.ws.rs.core.MultivaluedMap;
import javax.ws.rs.core.Response;
import javax.ws.rs.core.UriBuilder;
import javax.ws.rs.core.UriInfo;
@@ -43,10 +44,12 @@ public class FreeMarkerAccountProvider implements AccountProvider {
private static final Logger logger = Logger.getLogger(FreeMarkerAccountProvider.class);
private UserModel user;
private MultivaluedMap<String, String> profileFormData;
private Response.Status status = Response.Status.OK;
private RealmModel realm;
private String[] referrer;
private List<Event> events;
private String stateChecker;
private List<UserSessionModel> sessions;
private boolean socialEnabled;
private boolean eventsEnabled;
@@ -107,6 +110,10 @@ public class FreeMarkerAccountProvider implements AccountProvider {
}
URI baseQueryUri = baseUriBuilder.build();
if (stateChecker != null) {
attributes.put("stateChecker", stateChecker);
}
if (message != null) {
attributes.put("message", new MessageBean(messages.containsKey(message) ? messages.getProperty(message) : message, messageType));
}
@@ -115,19 +122,19 @@ public class FreeMarkerAccountProvider implements AccountProvider {
attributes.put("referrer", new ReferrerBean(referrer));
}
attributes.put("url", new UrlBean(realm, theme, baseUri, baseQueryUri, uriInfo.getRequestUri()));
attributes.put("url", new UrlBean(realm, theme, baseUri, baseQueryUri, uriInfo.getRequestUri(), stateChecker));
attributes.put("features", new FeaturesBean(socialEnabled, eventsEnabled, passwordUpdateSupported));
switch (page) {
case ACCOUNT:
attributes.put("account", new AccountBean(user));
attributes.put("account", new AccountBean(user, profileFormData));
break;
case TOTP:
attributes.put("totp", new TotpBean(user, baseUri));
break;
case SOCIAL:
attributes.put("social", new AccountSocialBean(session, realm, user, uriInfo.getBaseUri()));
attributes.put("social", new AccountSocialBean(session, realm, user, uriInfo.getBaseUri(), stateChecker));
break;
case LOG:
attributes.put("log", new LogBean(events));
@@ -182,6 +189,12 @@ public class FreeMarkerAccountProvider implements AccountProvider {
return this;
}
@Override
public AccountProvider setProfileFormData(MultivaluedMap<String, String> formData) {
this.profileFormData = formData;
return this;
}
@Override
public AccountProvider setRealm(RealmModel realm) {
this.realm = realm;
@@ -212,6 +225,12 @@ public class FreeMarkerAccountProvider implements AccountProvider {
return this;
}
@Override
public AccountProvider setStateChecker(String stateChecker) {
this.stateChecker = stateChecker;
return this;
}
@Override
public AccountProvider setFeatures(boolean socialEnabled, boolean eventsEnabled, boolean passwordUpdateSupported) {
this.socialEnabled = socialEnabled;
@@ -1,5 +1,7 @@
package org.keycloak.account.freemarker.model;
import javax.ws.rs.core.MultivaluedMap;
import org.keycloak.models.UserModel;
/**
@@ -7,18 +9,20 @@ import org.keycloak.models.UserModel;
*/
public class AccountBean {
private UserModel user;
private final UserModel user;
private final MultivaluedMap<String, String> profileFormData;
public AccountBean(UserModel user) {
public AccountBean(UserModel user, MultivaluedMap<String, String> profileFormData) {
this.user = user;
this.profileFormData = profileFormData;
}
public String getFirstName() {
return user.getFirstName();
return profileFormData != null ? profileFormData.getFirst("firstName") : user.getFirstName();
}
public String getLastName() {
return user.getLastName();
return profileFormData != null ? profileFormData.getFirst("lastName") :user.getLastName();
}
public String getUsername() {
@@ -26,7 +30,7 @@ public class AccountBean {
}
public String getEmail() {
return user.getEmail();
return profileFormData != null ? profileFormData.getFirst("email") :user.getEmail();
}
}
@@ -25,7 +25,7 @@ public class AccountSocialBean {
private final boolean removeLinkPossible;
private final KeycloakSession session;
public AccountSocialBean(KeycloakSession session, RealmModel realm, UserModel user, URI baseUri) {
public AccountSocialBean(KeycloakSession session, RealmModel realm, UserModel user, URI baseUri, String stateChecker) {
this.session = session;
URI accountSocialUpdateUri = Urls.accountSocialUpdate(baseUri, realm.getName());
this.socialLinks = new LinkedList<SocialLinkEntry>();
@@ -44,7 +44,11 @@ public class AccountSocialBean {
availableLinks++;
}
String action = socialLink != null ? "remove" : "add";
String actionUrl = UriBuilder.fromUri(accountSocialUpdateUri).queryParam("action", action).queryParam("provider_id", socialProviderId).build().toString();
String actionUrl = UriBuilder.fromUri(accountSocialUpdateUri)
.queryParam("action", action)
.queryParam("provider_id", socialProviderId)
.queryParam("stateChecker", stateChecker)
.build().toString();
SocialLinkEntry entry = new SocialLinkEntry(socialLink, provider.getName(), actionUrl);
this.socialLinks.add(entry);
@@ -44,6 +44,8 @@ public class SessionsBean {
this.session = session;
}
public String getId() {return session.getId(); }
public String getIpAddress() {
return session.getIpAddress();
}
@@ -16,13 +16,15 @@ public class UrlBean {
private URI baseURI;
private URI baseQueryURI;
private URI currentURI;
private String stateChecker;
public UrlBean(RealmModel realm, Theme theme, URI baseURI, URI baseQueryURI, URI currentURI) {
public UrlBean(RealmModel realm, Theme theme, URI baseURI, URI baseQueryURI, URI currentURI, String stateChecker) {
this.realm = realm.getName();
this.theme = theme;
this.baseURI = baseURI;
this.baseQueryURI = baseQueryURI;
this.currentURI = currentURI;
this.stateChecker = stateChecker;
}
public String getAccessUrl() {
@@ -54,11 +56,11 @@ public class UrlBean {
}
public String getSessionsLogoutUrl() {
return Urls.accountSessionsLogoutPage(baseQueryURI, realm).toString();
return Urls.accountSessionsLogoutPage(baseQueryURI, realm, stateChecker).toString();
}
public String getTotpRemoveUrl() {
return Urls.accountTotpRemove(baseQueryURI, realm).toString();
return Urls.accountTotpRemove(baseQueryURI, realm, stateChecker).toString();
}
public String getLogoutUrl() {
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-forms-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -10,7 +10,7 @@ import java.util.Properties;
*/
public interface Theme {
public enum Type { LOGIN, ACCOUNT, ADMIN, EMAIL, COMMON };
public enum Type { LOGIN, ACCOUNT, ADMIN, EMAIL, WELCOME, COMMON };
public String getName();
+1 -1
View File
@@ -4,7 +4,7 @@
<parent>
<artifactId>keycloak-forms-parent</artifactId>
<groupId>org.keycloak</groupId>
<version>1.0-rc-2-SNAPSHOT</version>
<version>1.0.1.Final</version>
<relativePath>../pom.xml</relativePath>
</parent>
<modelVersion>4.0.0</modelVersion>
@@ -21,6 +21,7 @@ public class DefaultKeycloakThemeProvider implements ThemeProvider {
private static Set<String> LOGIN_THEMES = new HashSet<String>();
private static Set<String> ADMIN_THEMES = new HashSet<String>();
private static Set<String> EMAIL_THEMES = new HashSet<String>();
private static Set<String> WELCOME_THEMES = new HashSet<String>();
private static Set<String> COMMON_THEMES = new HashSet<String>();
static {
@@ -28,6 +29,7 @@ public class DefaultKeycloakThemeProvider implements ThemeProvider {
Collections.addAll(LOGIN_THEMES, BASE, PATTERNFLY, KEYCLOAK);
Collections.addAll(ADMIN_THEMES, BASE, PATTERNFLY, KEYCLOAK);
Collections.addAll(EMAIL_THEMES, KEYCLOAK);
Collections.addAll(WELCOME_THEMES, KEYCLOAK);
Collections.addAll(COMMON_THEMES, KEYCLOAK);
}
@@ -56,6 +58,8 @@ public class DefaultKeycloakThemeProvider implements ThemeProvider {
return ADMIN_THEMES;
case EMAIL:
return EMAIL_THEMES;
case WELCOME:
return WELCOME_THEMES;
case COMMON:
return COMMON_THEMES;
default:
@@ -12,6 +12,8 @@
<form action="${url.accountUrl}" class="form-horizontal" method="post">
<input type="hidden" id="stateChecker" name="stateChecker" value="${stateChecker}">
<div class="form-group">
<div class="col-sm-2 col-md-2">
<label for="username" class="control-label">${rb.username}</label>
@@ -10,6 +10,7 @@ successHeader=Success!
username=Username
missingFirstName=Please specify first name
invalidEmail=Invalid email address
missingLastName=Please specify last name
missingEmail=Please specify email
missingPassword=Please specify password.
@@ -23,6 +23,8 @@
</div>
</#if>
<input type="hidden" id="stateChecker" name="stateChecker" value="${stateChecker}">
<div class="form-group">
<div class="col-sm-2 col-md-2">
<label for="password-new" class="control-label">${rb.passwordNew}</label>
Loaded 100 of 252 files, more files were not shown because too many files have changed in this diff. Show more