我一直在尝试使用CustomLoginModule
实现javax.security.auth.spi.LoginModule
并在wildfly 10中部署它的自定义类()。我将配置放在如下所述的standalone.xml中。我无法弄清楚CustomLoginModule
永不被调用的原因。我启用了跟踪功能,并能够确定该类是从的modules目录中加载的Wildfly10
。
独立配置:
<security-domain name="xxxx">
<authentication>
<login-module code="com.test.CustomLoginModule" flag="required">
<module-option name="userQuery" value="select USER_ID from FH_USER_TE where USER_ID=? and PASSWORD=?"/>
<module-option name="roleQuery" value="select ROLE from FH_USER_TE where USER_ID=?"/>
</login-module>
</authentication>
如果能在这里得到一些建议/建议以使它向前发展,那将是很棒的。
在TOMCAT 8中同样可以完美地工作
谢谢,Dwaipayan
I am able to invoke my CustomLoginModule Successfully by removing the jar from the modules directory of Wildfly 10. The .war bundles the CustomLoginModule class . I am not sure if this is the right way but it works. The options in CustomLoginModule although comes as "jboss.security.security_domain=fusionHiringLoginModule".
the sql queries have to be a part of module-option as below
<security-domain name="xxxxx" cache-type="default">
<authentication>
<login-module code="com.test.CustomLoginModule" flag="required">
<module-option name="userQuery" value="select userId from tableName where USER_ID=? and PASSWORD=?" />
<module-option name="roleQuery" value="select role from table where USER_ID=?" />
</login-module>
</authentication>
</security-domain>
Thanks
Dwaipayan
本文收集自互联网,转载请注明来源。
如有侵权,请联系 [email protected] 删除。
我来说两句