There's no clean way to achieve this, but you can follow the approach taken by "OsgiConfigLoginModule" [1] 1. Create a class which is initialized from the blueprint with the references you need. It stores the references in a static field [2]. 2. A custom implementation of the LoginModule can fetch the values from the static field.
That's not ideal - you can you have one such configuration per VM; no guarantees on the initialization order, etc. Svet. [1] https://github.com/apache/karaf/blob/master/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/osgi/OsgiConfigLoginModule.java#L52 [2] https://github.com/apache/karaf/blob/master/jaas/modules/src/main/java/org/apache/karaf/jaas/modules/osgi/ConfigAdminHolder.java#L30 > On 17.05.2017 г., at 13:46, ashgonline <[email protected]> wrote: > > Hi, > I have one peculiar thing to achieve. > I need to inject a list of bean references while initiating a JAAS module. > > <jaas:config name="karaf" rank="2"> > <jaas:module > className="org.apache.karaf.jaas.modules.osgi.OsgiConfigLoginModule" > flags="required"> > </jaas:module> > </jaas:config> > > Need to add a ref list of beans when this module is initialised. > I am not sure how to achieve the same. > > Any help in this regard will be welcome. > > Thanks.. > > > > > -- > View this message in context: > http://karaf.922171.n3.nabble.com/Issue-in-injecting-a-bean-with-JAAS-config-tp4050372.html > Sent from the Karaf - Dev mailing list archive at Nabble.com.
