JBoss Community Archive (Read Only)

PicketBox

File-based Identity Store

Introduction

This sectoin covers how to configure PicketBox to use a File-based Identity Store. It is the default store when no other is directly configured.

Basically, this store uses the file system to persist information, serializing them in files.

The only thing you need to know is how to configure this store with PicketBox. Its usage is the same as described by the Identity Management section. Remember that the most important component when working with PicketBox's Identity Management features is the Identity Manager. The stores only define which repository should be used and how to connect and integrate with them.

For more information about how to manage your users, roles, groups and related information using the Identity Manager, check the Identity Management section.

Configuration

To configure this store you need to use the Configuration API to define some specific configuration.

Configuring the LDAP-based Identity Store
ConfigurationBuilder builder = new ConfigurationBuilder();

PicketBoxManager picketBoxManager = // create and start the manager

IdentityManager identityManager = picketBoxManager.getIdentityManager();

// now you can play with the Identity Manager instance using the JPA Identity Store.
This store can be used in two ways, depending how you want to preserve or not the state between subsequent startups of PicketBox:

  • to preserve the state in between subsequent startups of PicketBox

  • to NOT preserve the state and clear the store during the PicketBox startup

By default, the file-based store is configured to not preserve its state. But you can change this behaviour during the configuration.

Configuring the File-based store to preserve its state
configBuilder
    .identityManager()
        .fileStore()
            .preserveState();
JBoss.org Content Archive (Read Only), exported from JBoss Community Documentation Editor at 2020-03-11 12:16:27 UTC, last content change 2012-11-01 17:38:17 UTC.