Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to create a dumb mode or stateless consumer #204

Open
GoogleCodeExporter opened this issue Jun 4, 2015 · 1 comment
Open

How to create a dumb mode or stateless consumer #204

GoogleCodeExporter opened this issue Jun 4, 2015 · 1 comment

Comments

@GoogleCodeExporter
Copy link

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

Original issue reported on code.google.com by [email protected] on 16 Dec 2013 at 7:32

@GoogleCodeExporter
Copy link
Author

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.

Original comment by [email protected] on 17 Dec 2013 at 12:07

  • Added labels: Type-Other
  • Removed labels: Type-Defect

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant