我一直在尝试使用实现CustomLoginModule
的自定义类(javax.security.auth.spi.LoginModule
)并将其部署在wildfly 10中。我已将配置放在standalone.xml中,如下所示。我无法弄清楚为什么CustomLoginModule
永远不会被调用。我已启用跟踪并能够确定从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
答案 0 :(得分:0)
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