Skip Menu |

This queue is for tickets about the Net-OpenID-Consumer CPAN distribution.

Report information
The Basics
Id: 74101
Status: resolved
Priority: 0/
Queue: Net-OpenID-Consumer

People
Owner: crew [...] cs.stanford.edu
Requestors: joey [...] kitenet.net
Cc:
AdminCc:

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: 1.14



Subject: documentation unclear about setup_needed
setup_needed => sub { # (OpenID 2) retry request in checkid_setup mode # (OpenID 1) redirect user to $csr->user_setup_url }, I find the above doumentation very unclear. How do I determine if openid 2 or openid 1 is in use? It's clear what to do for openid 1, but what does "retry request in checkid_setup mode" mean? Does it mean that I should here redirect to the $check_url used to start the openid login process? Since I don't know when this case happens, or how to test it, this is very murky indeed. BTW, the examples/consumer.cgi has: setup_required => sub { my ($setup_url) = @_; return [ 301, [ Location => $setup_url ], [] ]; }, This seems massively out of date. setup_required is a deprecated name. An up-to-date example would help significantly.
Show quoted text
> How do I determine if openid 2 or openid 1 is in use?
if ($csr->message->protocol_version < 2) { ... do OpenID 1 stuff... } else { ... do OpenID 2 stuff... } which is described in the IndirectMessage.pm POD but I may as well just put that straight into the synopsis in Consumer.pm Show quoted text
> but what does "retry request in checkid_setup mode" mean? > Does it mean that I should here redirect to > the $check_url used to start the openid login process?
Call $claimed_id->check_url a second time but with delayed_return => 1, to make a new $check_url to redirect the user to (which will then bounce around until the user logs in, or redirect back with some *other* error.). Discussion of checkid setup vs. checkid immediate is in the synopsis 15 lines further up (after "$check_url = ...") and the description of check_url in the ClaimedIdentity.pm POD goes into more detail (though I'm now seeing a bit of not-entirely-up-to-date text there, too) Show quoted text
> BTW, the examples/consumer.cgi has: > setup_required => sub { > my ($setup_url) = @_; > > return [ 301, [ Location => $setup_url ], [] ]; > }, > > This seems massively out of date. setup_required is a deprecated name.
well, not *massively* (it was only deprecated a couple months ago), but good catch, thanks. Show quoted text
> An up-to-date example would help significantly.
yup.
Subject: Re: [rt.cpan.org #74101] documentation unclear about setup_needed
Date: Tue, 17 Jan 2012 22:44:43 -0400
To: Roger Crew via RT <bug-Net-OpenID-Consumer [...] rt.cpan.org>
From: Joey Hess <joey [...] kitenet.net>
Roger Crew via RT wrote: Show quoted text
> > but what does "retry request in checkid_setup mode" mean? > > Does it mean that I should here redirect to > > the $check_url used to start the openid login process?
> > Call $claimed_id->check_url a second time but with delayed_return => 1, > to make a new $check_url to redirect the user to (which will then bounce > around until the user logs in, or redirect back with some *other* > error.).
If check_url was called with delayed_return => 1 in the first place, does this need to be done? Sounds like not; if not it would be good to make that clear in the docs. -- see shy jo
Download signature.asc
application/pgp-signature 828b

Message body not shown because it is not plain text.

If check_url was called with delayed_return => 1 in the first place, then, as described in the synopsis and the docs for check_url and setup_needed, that would be a "checkid_setup mode" request and you should not be getting the "setup_needed" response at all.
fixed (or at least vaguely improved, I hope) in 1.14