gpt4 book ai didi

java - openid4java 如何创建哑模式或无状态消费者

转载 作者:行者123 更新时间:2023-12-01 13:42:28 25 4
gpt4 key购买 nike

// 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还是做了关联。

最佳答案

OpenID 工作需要发现操作。

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

Note that by default the consumer manager works in the smart mode and will take four attempts to create an association with the openid provider. Since we have set the number of attempts to zero, the method returns only the DiscoveryInformation object and would make no association though the name of the method is "associate".

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

关于java - openid4java 如何创建哑模式或无状态消费者,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/20606522/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com