Skip to content

Commit

Permalink
finish
Browse files Browse the repository at this point in the history
  • Loading branch information
patriot1burke committed Dec 3, 2016
1 parent 9e50a45 commit e88af87
Show file tree
Hide file tree
Showing 34 changed files with 810 additions and 504 deletions.
4 changes: 3 additions & 1 deletion common/src/main/java/org/keycloak/common/util/EnvUtil.java
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@
import java.util.regex.Pattern;

/**
* Replaces any ${} strings with their corresponding system property.
*
* @author <a href="mailto:bill@burkecentral.com">Bill Burke</a>
* @version $Revision: 1 $
*/
Expand All @@ -32,7 +34,7 @@ private EnvUtil() {
}

/**
* Replaces any ${} strings with their corresponding environent variable.
* Replaces any ${} strings with their corresponding system property.
*
* @param val
* @return
Expand Down
3 changes: 2 additions & 1 deletion examples/providers/user-storage-jpa/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,5 @@ Login and go to the User Federation tab and you should now see your deployed pro
Add the provider, save it, then any new user you create will be stored and in the custom store you implemented. You
can modify the example and hot deploy it using the above maven command again.

This example uses the built in in-memory datasource that comes with keycloak: ExampleDS.
This example uses the built in in-memory datasource that comes with keycloak: ExampleDS. NOTE!!! You'll have
to change this to be an xa datasource for this to work.
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
http://java.sun.com/xml/ns/persistence
http://java.sun.com/xml/ns/persistence/persistence_2_0.xsd">
<persistence-unit name="user-storage-jpa-example" transaction-type="JTA">
<jta-data-source>java:jboss/datasources/ExampleDS</jta-data-source>
<jta-data-source>java:jboss/datasources/KeycloakDS</jta-data-source>

<class>org.keycloak.examples.storage.user.UserEntity</class>

Expand Down
17 changes: 7 additions & 10 deletions examples/providers/user-storage-simple/README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
Example User Federation Provider
Example User Storage Provider
===================================================

This is an example of user storage backed by a simple properties file. This properties file only contains username/password
Expand All @@ -7,13 +7,10 @@ key pairs. To deploy this provider you must have Keycloak running in standalone
mvn clean install wildfly:deploy


The "readonly-property-file" provider is hardcoded to look within the users.properties file embeded in the deployment jar
THere is one user 'tbrady' with a password of 'superbowl'

The ClasspathPropertiesStorageProvider is an example of a readonly provider. If you go to the Users/Federation
page of the admin console you will see this provider listed under "classpath-properties. To configure this provider you
specify a classpath to a properties file in the "path" field of the admin page for this plugin. This example includes
a "test-users.properties" within the JAR that you can use as the variable.

The FilePropertiesStorageProvider is an example of a writable provider. It synchronizes changes made to
username and password with the properties file. If you go to the Users/Federation page of the admin console you will
see this provider listed under "file-properties". To configure this provider you specify a fully qualified file path to
a properties file in the "path" field of the admin page for this plugin.
The "writeable-property-file" provider can be configured to point to a property file on disk. It uses federated
storage to augment the property file with any other information the user wants.

Our developer guide walks through the implementation of both of these providers.

This file was deleted.

This file was deleted.

This file was deleted.

This file was deleted.

Loading

0 comments on commit e88af87

Please sign in to comment.