Java Property File Synchronization Example

This example contains the source code for an example implementation of both the ExternalLoginProvider and the DynamicParticipantSynchronizationProvider interface, based on Java property files.

Click the following link to download the sources for this example as ZIP file:

The location of the property file to be used has to be configured by setting the User.Registry property, which defaults to user-registry.properties.

In general a DynamicParticipantSynchronizationProvider takes care of retrieving authorization information for an authenticated user as well as detail about this user itself from an external user registry. This example shows how to retrieve this information from a plain Java property file.

The general syntax of such user registry property file is:

User.$account$.Password
The most basic entry for a user, its existence marks the user as existent. The also provided ExternalLoginProvider implementation may be used to authenticate users against this password.
User.$account$.FirstName
Optional property, specifying the users first name.
User.$account$.LastName
Optional property, specifying the users last name.
User.$account$.EMail
Optional property, specifying the users email address.
User.$account$.Roles
Optional property, specifying the model participants granted to the user as a comma separated list.
User.$account$.UserGroups
Optional property, specifying the user groups the user is a member of as a semicolon separated list. Any user group / department referenced has to be defined by an appropriate Group.$id$.Name / Department.$id$.Name entry.
Group.$id$.Name
Required property to define the existence of a user group.
Department.$deptId$.Name
Required property to define the existence of a department. The structure of a $deptId$ is as follows: <Organization-Id><<Department-Id>|null{,<Department-Id>|null}>, e.g. Org2<u,i>, Org3<u,i,null>.
Department.$deptId$.Description
Optional property, specifying the department's description.

For more detailed information on the DynamicParticipantSynchronizationProvider interface please refer to the chapter Implementing Custom Security of the Programming Guide.