This was a strange one. I set up an OSGi runtime including several(I think two) AuthenticationProviders, but only one was injected into the DefaultAuthenticationManager.
What I did was to change the reference policy from static to dynamic, but I am not sure in this change:
@@ -63,7 +64,7 @@ public class DefaultAuthenticationManager implements AuthenticationManager {
throw new AuthenticationException("Could not authenticate credentials " + credentials);
}
- @Reference(cardinality = ReferenceCardinality.MULTIPLE)
+ @Reference(cardinality = ReferenceCardinality.MULTIPLE, policy=ReferencePolicy.DYNAMIC)
public void addAuthenticationProvider(AuthenticationProvider provider) {
providers.add(provider);
}
I had similar problem in the AuthenticationHandler:
This was a strange one. I set up an OSGi runtime including several(I think two) AuthenticationProviders, but only one was injected into the DefaultAuthenticationManager.
What I did was to change the reference policy from static to dynamic, but I am not sure in this change:
I had similar problem in the AuthenticationHandler: