-
Notifications
You must be signed in to change notification settings - Fork 39
Open
Labels
Milestone
Description
I've created the following decorator to do some operations with the returned groups:
@Priority(2000)
@Decorator
public class IdentityStoreDecorator implements IdentityStore {
@Inject
@Delegate
@Any
private IdentityStore decorated;
@Override
public CredentialValidationResult validate(Credential credential) {
return decorated.validate(credential);
}
@Override
public Set<String> getCallerGroups(CredentialValidationResult validationResult) {
return decorated.getCallerGroups(validationResult);
}
}
But the CdiUtils#getBeanDefinitions()
method which is internally called to get the enabled IdentityStores returns the original object (org.glassfish.soteria.cdi.CdiProducer interface javax.security.enterprise.identitystore.DatabaseIdentityStoreDefinition
).
I guess the problem is on the org.glassfish.soteria.cdi.CdiProducer
which is creating instances without taking decorators into account. The same applies to @Alternative
's.