@ApplicationScoped
public class IdentityManagementConfiguration {
@Inject
private Logger log;
@Inject
private EEJPAContextInitializer contextInitializer;
private IdentityConfiguration identityConfig = null;
@Produces IdentityConfiguration createConfig() {
if (identityConfig == null) {
initConfig();
}
return identityConfig;
}
/**
* This method uses the IdentityConfigurationBuilder to create an IdentityConfiguration, which
* defines how PicketLink stores identity-related data. In this particular example, a
* JPAIdentityStore is configured to allow the identity data to be stored in a relational database
* using JPA.
*/
@SuppressWarnings("unchecked")
private void initConfig() {
IdentityConfigurationBuilder builder = new IdentityConfigurationBuilder();
log.debug("START - Initializing JPA Identity store");
builder
.named("default")
.stores()
.jpa()
.mappedEntity(
AccountTypeEntity.class,
RoleTypeEntity.class,
GroupTypeEntity.class,
IdentityTypeEntity.class,
RelationshipTypeEntity.class,
RelationshipIdentityTypeEntity.class,
PartitionTypeEntity.class,
PasswordCredentialTypeEntity.class,
AttributeTypeEntity.class)
.supportGlobalRelationship(Relationship.class)
.addContextInitializer(this.contextInitializer)
// Specify that this identity store configuration supports all features
.supportAllFeatures();
identityConfig = builder.build();
log.debug("END - Initializing JPA Identity store");
}
Thanks
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira
Pedro, here you are:
Thanks