forked from eclipse-archived/smarthome
-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
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:
@@ -135,7 +148,7 @@ public class AuthenticationHandler implements Handler {
}
}
- @Reference(cardinality = ReferenceCardinality.OPTIONAL)
+ @Reference(cardinality = ReferenceCardinality.OPTIONAL, policy = ReferencePolicy.DYNAMIC)
public void setAuthneticationManager(AuthenticationManager authenticationManager) {
this.authenticationManager = authenticationManager;
}
Metadata
Metadata
Assignees
Labels
No labels