// 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仍然是一名合伙人。
发布于 2013-12-27 13:49:26
发现操作是需要的,OpenID才能工作。
关于哑巴模式,以下是您所指出的博客文章的摘录:
注意,默认情况下,使用者管理器在智能模式下工作,将进行四次尝试来创建与openid提供者的关联。由于我们已经将尝试次数设置为零,所以该方法只返回DiscoveryInformation对象,并且不会进行关联,尽管该方法的名称是“关联”。
根据它,客户端程序确实在哑巴模式下运行。
https://stackoverflow.com/questions/20606522
复制相似问题