2013-12-16 19 views
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); 

如何創建一個愚蠢模式或無狀態消費者沒有發現和關聯?openid4java如何創建一個愚蠢模式或無狀態消費者

我跟着http://sureshatt.blogspot.com/2011/05/openid-dumb-mode-consumer-with.html,但openid4java仍然有聯繫。

回答

1

發現操作是需要爲OpenID工作。

關於啞模式,這裏是從博文的摘錄,你曾經指出:

注意,默認情況下,消費者經理工作在智能模式,並會採取四次嘗試建立與OpenID提供商的關聯。由於我們已將嘗試次數設置爲零,該方法僅返回DiscoveryInformation對象,並且不會關聯,儘管方法的名稱是「associate」。

據此,客戶端程序確實以啞模式工作。