首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >openid4java如何创建哑模式或无状态使用者

openid4java如何创建哑模式或无状态使用者
EN

Stack Overflow用户
提问于 2013-12-16 08:40:36
回答 1查看 212关注 0票数 0
代码语言:javascript
复制
// 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仍然是一名合伙人。

EN

回答 1

Stack Overflow用户

回答已采纳

发布于 2013-12-27 13:49:26

发现操作是需要的,OpenID才能工作。

关于哑巴模式,以下是您所指出的博客文章的摘录:

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

根据它,客户端程序确实在哑巴模式下运行。

票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/20606522

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档