The LoginModules need to be on the system classpath due to class loading restrictions with JAAS.
Regarding this issue, what do you suggest is the best approach to adding your custom LoginModules to the system classpath? I built my custom LoginModule into a jar and have placed it in $jboss.dist/lib. Then added it to JBOSS_CLASSPATH in run.sh.
This works, however I'm not that happy about editing run.sh to add a new LoginModule lib. Do you have a better suggestion?
p.s. My custom LoginModule is an LDAP based one, derived from your example LdapLoginModule.java (I've had to modify due to peculiarities with our schema). Anyway, just thought I'd note that there is a small typo in the 'sample login config' dooco in the LDAP logic module source. No ';' has been included at the end of the configuration block options, and the '//' in the value 'ldap://siren-int' caused my JBoss to get upset, possibly due to // being a comment?
Anyway thought I'd point this out as having a ';' in the wrong place in a configuration block makes JBoss very unhappy and it's not very nice at telling exactly why it's unhappy!
Anyway thanks for your JavaWorld article, very helpful in getting this stuff running.
you can use the ProxyLoginModule to bootstrap your login modules.