Issue 204 in openid4java: How to create a dumb mode or stateless consumer

3 views
Skip to first unread message

codesite...@google.com

unread,
Dec 16, 2013, 2:32:11 AM12/16/13
to openid4java-...@googlegroups.com
Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 204 by i...@chenxiaosheng.com: How to create a dumb mode or
stateless consumer
http://code.google.com/p/openid4java/issues/detail?id=204

// 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);

========================================================

How to create a dumb mode or stateless consumer without discovery and
associate?

thanks

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

codesite...@google.com

unread,
Dec 16, 2013, 7:07:57 PM12/16/13
to openid4java-...@googlegroups.com
Updates:
Labels: -Type-Defect Type-Other

Comment #1 on issue 204 by Johnny.B...@gmail.com: How to create a dumb mode
Assciations are optional but discovery is required.

Forcing stateless mode can be done by setting following (before
manager.associate() is called):

manager.setMaxAssocAttempts(0)

manager.associate() will in this case not attempt to associate and will
return the first entry from the discoveries list. This should be passed
later to manager.verify(), to avoid re-running discovery (which involves
network calls) if possible.
Reply all
Reply to author
Forward
0 new messages