IBM Worklight - 自定义身份验证

时间:2014-06-02 11:04:26

标签: ibm-mobilefirst worklight-security

尝试使用自定义身份验证器和登录模块验证适配器时,我遇到以下异常。

[ERROR   ] FWLST0003E: ========= Failed starting project /CustomAuth [project CustomAuth]
Error creating bean with name 'taskManager' defined in URL [wsjar:file:/D:/worklight_workspace/WorklightServerConfig/shared/resources/worklight-jee-library-6.1.0.jar!/conf/core.xml]: Cannot resolve reference to bean 'worklightAuthenticationService' while setting bean property 'authenticationService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'worklightAuthenticationService' defined in URL [wsjar:file:/D:/worklight_workspace/WorklightServerConfig/shared/resources/worklight-jee-library-6.1.0.jar!/conf/core.xml]: Cannot create inner bean 'com.worklight.core.auth.impl.LoginConfigurationServiceBean#7cffa209' of type [com.worklight.core.auth.impl.LoginConfigurationServiceBean] while setting bean property 'loginConfigurationService'; nested exception is org.springframework.beans.factory.BeanCreationException: Error creating bean with name 'com.worklight.core.auth.impl.LoginConfigurationServiceBean#7cffa209' defined in URL [wsjar:file:/D:/worklight_workspace/WorklightServerConfig/shared/resources/worklight-jee-library-6.1.0.jar!/conf/core.xml]: Invocation of init method failed; nested exception is java.lang.RuntimeException: Class 'com.mypackage.MyCustomLoginModule' defined in login module 'CustomLoginModule' in the authentication configuration file doesn't exist.
[AUDIT   ] CWWKZ0001I: Application CustomAuth started in 0.948 seconds.
[ERROR   ] SRVE0315E: An execption occurred: com.ibm.ws.webcontainer.webapp.WebAppErrorReport: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.lang.RuntimeException: Class 'com.mypackage.MyCustomLoginModule' defined in login module 'CustomLoginModule' in the authentication configuration file doesn't exist.
    at com.worklight.core.auth.impl.AuthenticationFilter.verifyServletInitialized(AuthenticationFilter.java:300)
    at com.worklight.core.auth.impl.AuthenticationFilter.doFilter(AuthenticationFilter.java:111)
    at com.ibm.ws.webcontainer.filter.FilterInstanceWrapper.doFilter(FilterInstanceWrapper.java:194)
    at [internal classes]
Caused by: javax.servlet.ServletException: Worklight Console initialization failed.Logged Exception: java.lang.RuntimeException: Class 'com.mypackage.MyCustomLoginModule' defined in login module 'CustomLoginModule' in the authentication configuration file doesn't exist.
    ... 5 more

你能帮帮我吗?

3 个答案:

答案 0 :(得分:0)

由于某种原因,似乎你的项目战不包含你的java类。我不确定为什么,需要更多相关信息,但我认为通过删除bin文件夹并重建所有工件,您将能够解决此问题。

答案 1 :(得分:0)

在生成的二进制应用程序和Worklight服务器版本之间查看JDK版本。您可以检查二进制文件是否在基于Windows或Unix的操作系统中生成,并重新部署您的应用程序,将服务器操作系统作为二进制应用程序的基础。

答案 2 :(得分:0)

需要编写自己的java类进行自定义身份验证。在编写自定义身份验证方法时,这些java类将像authenticator和challenger一样。

请找到基于HTTP的自定义身份验证的documentation