Search in sources :

Example 1 with DefaultPartitionManager

use of org.picketlink.idm.internal.DefaultPartitionManager in project wildfly by wildfly.

the class PartitionManagerService method start.

@Override
public void start(StartContext context) throws StartException {
    ROOT_LOGGER.debugf("Starting PartitionManagerService for [%s]", this.alias);
    this.partitionManager = new DefaultPartitionManager(this.configurationBuilder.buildAll());
    publishPartitionManager(context);
}
Also used : DefaultPartitionManager(org.picketlink.idm.internal.DefaultPartitionManager)

Example 2 with DefaultPartitionManager

use of org.picketlink.idm.internal.DefaultPartitionManager in project rubia-forums by flashboss.

the class JBossUserModule method init.

@PostConstruct
public void init() {
    if (identityManager == null) {
        IdentityConfigurationBuilder builder = new IdentityConfigurationBuilder();
        builder.named("file-store-preserve-state").stores().file().preserveState(true).supportAllFeatures();
        PartitionManager partitionManager = new DefaultPartitionManager(builder.buildAll());
        Realm realm = partitionManager.getPartition(Realm.class, "forums-realm");
        if (realm == null) {
            realm = new Realm("forums-realm");
            partitionManager.add(realm);
        }
        identityManager = partitionManager.createIdentityManager(realm);
        insertUser("root");
        insertUser("mary");
        insertUser("john");
        insertUser("demo");
    }
}
Also used : DefaultPartitionManager(org.picketlink.idm.internal.DefaultPartitionManager) PartitionManager(org.picketlink.idm.PartitionManager) IdentityConfigurationBuilder(org.picketlink.idm.config.IdentityConfigurationBuilder) DefaultPartitionManager(org.picketlink.idm.internal.DefaultPartitionManager) Realm(org.picketlink.idm.model.basic.Realm) PostConstruct(javax.annotation.PostConstruct)

Example 3 with DefaultPartitionManager

use of org.picketlink.idm.internal.DefaultPartitionManager in project rubia-forums by flashboss.

the class JBossUserModule method init.

@PostConstruct
public void init() {
    if (identityManager == null) {
        IdentityConfigurationBuilder builder = new IdentityConfigurationBuilder();
        builder.named("file-store-preserve-state").stores().file().preserveState(true).supportAllFeatures();
        PartitionManager partitionManager = new DefaultPartitionManager(builder.buildAll());
        Realm realm = partitionManager.getPartition(Realm.class, "forums-realm");
        if (realm == null) {
            realm = new Realm("forums-realm");
            partitionManager.add(realm);
        }
        identityManager = partitionManager.createIdentityManager(realm);
        insertUser("root");
        insertUser("mary");
        insertUser("john");
        insertUser("demo");
    }
}
Also used : DefaultPartitionManager(org.picketlink.idm.internal.DefaultPartitionManager) PartitionManager(org.picketlink.idm.PartitionManager) IdentityConfigurationBuilder(org.picketlink.idm.config.IdentityConfigurationBuilder) DefaultPartitionManager(org.picketlink.idm.internal.DefaultPartitionManager) Realm(org.picketlink.idm.model.basic.Realm) PostConstruct(javax.annotation.PostConstruct)

Example 4 with DefaultPartitionManager

use of org.picketlink.idm.internal.DefaultPartitionManager in project rubia-forums by flashboss.

the class JBossUserModule method init.

@PostConstruct
public void init() {
    if (identityManager == null) {
        IdentityConfigurationBuilder builder = new IdentityConfigurationBuilder();
        builder.named("file-store-preserve-state").stores().file().preserveState(true).supportAllFeatures();
        PartitionManager partitionManager = new DefaultPartitionManager(builder.buildAll());
        Realm realm = partitionManager.getPartition(Realm.class, "forums-realm");
        if (realm == null) {
            realm = new Realm("forums-realm");
            partitionManager.add(realm);
        }
        identityManager = partitionManager.createIdentityManager(realm);
        insertUser("root");
        insertUser("mary");
        insertUser("john");
        insertUser("demo");
    }
}
Also used : DefaultPartitionManager(org.picketlink.idm.internal.DefaultPartitionManager) PartitionManager(org.picketlink.idm.PartitionManager) IdentityConfigurationBuilder(org.picketlink.idm.config.IdentityConfigurationBuilder) DefaultPartitionManager(org.picketlink.idm.internal.DefaultPartitionManager) Realm(org.picketlink.idm.model.basic.Realm) PostConstruct(javax.annotation.PostConstruct)

Example 5 with DefaultPartitionManager

use of org.picketlink.idm.internal.DefaultPartitionManager in project rubia-forums by flashboss.

the class JBossUserModule method init.

@PostConstruct
public void init() {
    if (identityManager == null) {
        IdentityConfigurationBuilder builder = new IdentityConfigurationBuilder();
        builder.named("file-store-preserve-state").stores().file().preserveState(true).supportAllFeatures();
        PartitionManager partitionManager = new DefaultPartitionManager(builder.buildAll());
        Realm realm = partitionManager.getPartition(Realm.class, "forums-realm");
        if (realm == null) {
            realm = new Realm("forums-realm");
            partitionManager.add(realm);
        }
        identityManager = partitionManager.createIdentityManager(realm);
        insertUser("root");
        insertUser("mary");
        insertUser("john");
        insertUser("demo");
    }
}
Also used : DefaultPartitionManager(org.picketlink.idm.internal.DefaultPartitionManager) PartitionManager(org.picketlink.idm.PartitionManager) IdentityConfigurationBuilder(org.picketlink.idm.config.IdentityConfigurationBuilder) DefaultPartitionManager(org.picketlink.idm.internal.DefaultPartitionManager) Realm(org.picketlink.idm.model.basic.Realm) PostConstruct(javax.annotation.PostConstruct)

Aggregations

DefaultPartitionManager (org.picketlink.idm.internal.DefaultPartitionManager)5 PostConstruct (javax.annotation.PostConstruct)4 PartitionManager (org.picketlink.idm.PartitionManager)4 IdentityConfigurationBuilder (org.picketlink.idm.config.IdentityConfigurationBuilder)4 Realm (org.picketlink.idm.model.basic.Realm)4