I'm pretty new to JBoss, but I have worked with JAAS for a while. I have a custom LoginModule that works great if I configure it in the "other" section of login-config.xml. When I create a section just for my module, call it id1, the web app totally passes it by.
Here are the steps I took to configure it.
I added the section to login-config.xml:
<application-policy name = "id2">
<login-module code="com.choiceid.login.IDLoginModule" flag="required">
<module-option name="dsJndiName">java:cidb</module-option>
<module-option name="principalsQuery">select userlist.password from userlist where userid=?</module-option>
<module-option name="rolesQuery">select role.[desc] as [Roles] from userlist inner join role on userlist.role = role.[id] where userid =?</module-option>
</login-module>
</application-policy>
I added <security-domain>java:/jaas/id2</security-domain> to JBoss-web.xml, and I added the realm-name to the web.xml.
After all that, and a bounce of Jboss, application-policy name isn't found and the LoginModule isn't executed. Again, if I put it in "other" it works like a champ. Any ideas?
Thanks!
B
Sorry I made a typo in the application-policy name section, it should read id1 NOT id2. My bad, this is a typo in the post, not in the code :)