【发布时间】:2014-11-09 04:54:49
【问题描述】:
我有一个使用第三方OpenID 提供程序进行登录的“依赖方”应用程序。但是,如果我尝试使用使用org.openid4java.server.SampleServer 的“本土”OpenID 提供程序登录,则不会在beginConsumption 和endConsumption 之间维护会话。
我可以看到成功的发现和关联,这在 springs OpenID4JavaConsumer 中实现:
DiscoveryInformation information = consumerManager.associate(discoveries);
req.getSession().setAttribute(DISCOVERY_INFO_KEY, information);
但是在我的 OP 进行身份验证并将 response.sendRedirect 返回到 RP 之后,在那里开始了一个新会话,并且我在 OpenID4JavaConsumer.endConsumption 失败了:
DiscoveryInformation discovered =
(DiscoveryInformation) request.getSession().getAttribute(DISCOVERY_INFO_KEY);
if (discovered == null) {
throw new OpenIDConsumerException("DiscoveryInformation is not available. Possible causes are lost session or replay attack");
}
是什么导致了这个新会话被创建,我怎样才能保留我的旧会话?
【问题讨论】:
标签: session openid session-state httpsession openid4java