0
// perform discovery on the user-supplied identifier
List discoveries = manager.discover(userSuppliedString);

// attempt to associate with the OpenID provider
// and retrieve one service endpoint for authentication
DiscoveryInformation discovered = manager.associate(discoveries);

// store the discovery information in the user's session
httpReq.getSession().setAttribute("openid-disc", discovered);

// obtain a AuthRequest message to be sent to the OpenID provider
AuthRequest authReq = manager.authenticate(discovered, returnToUrl);

如何在没有发现和关联的情况下创建哑模式或无状态消费者?

我已经关注了http://sureshatt.blogspot.com/2011/05/openid-dumb-mode-consumer-with.html,但是 openid4java 仍然是一个伙伴。

4

1 回答 1

1

OpenID需要发现操作才能工作。

关于哑模式,这是您指出的博客文章的摘录:

请注意,默认情况下,消费者管理器在智能模式下工作,将尝试四次来创建与 openid 提供者的关联。由于我们已将尝试次数设置为零,因此该方法仅返回 DiscoveryInformation 对象并且不会进行关联,尽管该方法的名称是“关联”。

据它说,该客户端程序确实以哑模式运行。

于 2013-12-27T13:49:26.850 回答