openam客户端sdk会话ID无效

时间:2012-09-18 10:13:56

标签: java opensso openam

我使用openam和tomcat 7 以下行总是产生异常                SSOTokenManager manager = SSOTokenManager.getInstance();                SSOToken ssoToken = manager.createSSOToken(request);

会话ID无效

我认为某些配置可能存在问题

任何帮助???

amSSOProvider:09/18/2012 01:18:01:882 PM EEST:Thread [http-bio-9090-exec-151,5,main] 无法从HttpRequest创建SSOToken com.iplanet.dpro.session.SessionException:无效的会话ID。     在com.iplanet.dpro.session.Session.getSession(Session.java:1062)     at com.iplanet.sso.providers.dpro.SSOProviderImpl.createSSOToken(SSOProviderImpl.java:92)     在com.iplanet.sso.SSOTokenManager.createSSOToken(SSOTokenManager.java:241)     在main.TestServlet2.doGet(TestServlet2.java:48)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:621)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:723)     在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)     在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)     在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:170)     在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:473)     在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)     在org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:930)     在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:120)     在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)     在org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)     at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:515)     at org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint.java:304)     at java.util.concurrent.ThreadPoolExecutor $ Worker.runTask(ThreadPoolExecutor.java:886)     at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:909)     在java.lang.Thread.run(Thread.java:619)

com.iplanet.sso.SSOException:无效的会话ID。     在com.iplanet.sso.providers.dpro.SSOProviderImpl.createSSOToken(SSOProviderImpl.java:111)     在com.iplanet.sso.SSOTokenManager.createSSOToken(SSOTokenManager.java:241)     在main.TestServlet2.doGet(TestServlet2.java:48)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:621)     在javax.servlet.http.HttpServlet.service(HttpServlet.java:723)     在org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)     在org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:210)     在org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:224)     在org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:170)     在org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:473)     在org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:168)     at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102)     在org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:930)     在org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:120)     在org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:405)     在org.apache.coyote.http11.AbstractHttp11Processor.process(AbstractHttp11Processor.java:964)     at org.apache.coyote.AbstractProtocol $ AbstractConnectionHandler.process(AbstractProtocol.java:515)     at org.apache.tomcat.util.net.JIoEndpoint $ SocketProcessor.run(JIoEndpoint.java:304)     at java.util.concurrent.ThreadPoolExecutor $ Worker.runTask(ThreadPoolExecutor.java:886)     at java.util.concurrent.ThreadPoolExecutor $ Worker.run(ThreadPoolExecutor.java:909)     在java.lang.Thread.run(Thread.java:619) 引起:com.iplanet.dpro.session.SessionException:无效的会话ID。     在com.iplanet.dpro.session.Session.getSession(Session.java:1062)     在com.iplanet.sso.providers.dpro.SSOProviderImpl.createSSOToken(SSOProviderImpl.java:92)

1 个答案:

答案 0 :(得分:0)

确保您的应用程序的域名与openam服务器的域名相关 这样的例子 如果openam域服务器喜欢openam.example.com,那么cookie名称是.example.com 所以你的应用程序也在这个域yourhost.example.com,所以我们可以从cookie获取令牌。