How to handle sreg in N::O::Server?

18 views
Skip to first unread message

Robert Norris

unread,
Oct 22, 2010, 7:58:05 AM10/22/10
to openi...@googlegroups.com
I've finally managed to get a basic provider up and running this evening and have made a start on some documentation for people wanting to make their own system into a provider as I found the whole mess rather obtuse (though technically correct).

Anyway, I'm now looking at implementing sreg. Can anyone give an idea of the best way to handle this? The difficulty I'm currently up against is that openid.sreg.required and openid.sreg.optional come into the endpoint from the RP, but aren't passed through to setup where the results should be added to the call to signed_return_url. Furthermore if the user is already logged in and trusts the RP, setup is never redirected to and signed_return_url gets called from within handle_page, and so there's no opportunity to add the sreg response.

I have hacked around by having is_trusted always return false causing a redirect to setup in all cases, storing the required and optional parameter list in session storage and then reloading them in setup and passing the results to signed_return_url there, but its quite painful and the extra redirect really sucks.

I've seen this patch that might help to address this:

For the moment however I don't want to patch the N::O::Server itself if I don't have to, and I'm not yet familiar enough with the code to know if this patch is the right approach anyway (I think a simpler get_extras call might be more appropriate than piggybacking on get_args).

Anyone got some insights for me?

Thanks!
Rob.

Freaking Wildchild

unread,
Oct 25, 2010, 9:01:07 AM10/25/10
to Net::OpenID for Perl
Hi Rob,

I've been looking at this in all kinds-of-ways and think the patch is
the easiest (but more dirty) approach of getting sreg included.
The codebase has not been updated for some while and hope some changes
will/can be done rather faster than in waiting pace ...

I've also been patching the server to "always return to a setup_url" ;
while this wasn't possible with the official N::O::S release because
of restrictions around the code.
Also a few OpenID providers seem not to be working fluently with the
current N::O::S codebase, creating random crashes or inaccessibility
back to the provider because of the newest changes around OpenID; I've
been testing 300 sites whereof about 15 sites did not work with this
codebase without serious patching.

Another alternative is switching completely to OpenID::Lite ; which is
in many ways compatible with the current way of Net::OpenID::Server of
calling routines, but haven't tried that approach yet of porting
everything over between modules.
The sreg support and diverse other other services seem to be matured,
in that build, but sure will need an overhaul of coding.

I'd sure like to hear from others how they added the latest OpenID
changes with the N::O::S codebase.

Is this codebase of N::O::S still maintained might be a better
question ; because if not, a fork might need to happen in order to be
compatible again with the newest evolutions and changes around OpenID.

With regards,

Gunther.

Robert Norris

unread,
Oct 25, 2010, 5:10:37 PM10/25/10
to openi...@googlegroups.com
I've noticed a few sites not working too. It does look like there's a few things missing from the Server code at the moment.

I've been working on pulling together as many disparate forks and patches to the N::O::Consumer and N::O::Server as I can in the hopes of getting things up to date and working again. My repositories are here:


I've still got a bunch of unmerged patches on my laptop which I should have merged and pushed over the next couple of days.

As I look around the codebase I see that extensions are handled in Consumer via Net::OpenID::Extension::* in Net-OpenID-Common. I haven't thought it all through but I think something like what it proposes in the POD is probably good approach going forward (not least because this seems to be the direction Mart was taking it).


I'm hoping that once I get all this stuff into shape that I can permission do an upload to CPAN. I guess it'll really depend on whether what I've done looks sane, but I'm hoping that other interested folks like yourself will help.

--
You received this message because you are subscribed to the Google Groups "Net::OpenID for Perl" group.
To post to this group, send email to openi...@googlegroups.com.
To unsubscribe from this group, send email to openid-perl...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/openid-perl?hl=en.


Adam Sjøgren

unread,
Oct 26, 2010, 3:12:34 PM10/26/10
to openi...@googlegroups.com
On Tue, 26 Oct 2010 08:10:37 +1100, Robert wrote:

> I've been working on pulling together as many disparate forks and
> patches to the N::O::Consumer and N::O::Server as I can in the hopes
> of getting things up to date and working again. My repositories are
> here:

Just a word of encouragement: This is very cool - getting all the
different patches together and making a CPAN-release sounds great!

I haven't had time to try the code from your repos yet, but I hope to
get some spare time and do so soon(ish).

(My use is a very simple provider I've hacked up, so I don't have to
rely on a third party OpenID-provider.)


Best regards,

Adam

--
"Écoutez la colere du peuple" Adam Sjøgren
as...@koldfront.dk

Freaking Wildchild

unread,
Oct 27, 2010, 3:11:10 AM10/27/10
to Net::OpenID for Perl
Quick question:

Are those common libraries more-or-less compatible with the current
build of N::O::S ?

Because this could solve a lot of problems and refreshen this codebase
back to a breathing and living module *Frankenstein-odd-look*

With greetings,

Gunther.

On Oct 25, 11:10 pm, Robert Norris <r...@eatenbyagrue.org> wrote:
> I've noticed a few sites not working too. It does look like there's a few
> things missing from the Server code at the moment.
>
> I've been working on pulling together as many disparate forks and patches to
> the N::O::Consumer and N::O::Server as I can in the hopes of getting things
> up to date and working again. My repositories are here:
>
> http://github.com/robn/Net-OpenID-Commonhttp://github.com/robn/Net-OpenID-Consumerhttp://github.com/robn/Net-OpenID-Server
>
> <http://github.com/robn/Net-OpenID-Server>I've still got a bunch of unmerged
> patches on my laptop which I should have merged and pushed over the next
> couple of days.
>
> As I look around the codebase I see that extensions are handled in Consumer
> via Net::OpenID::Extension::* in Net-OpenID-Common. I haven't thought it all
> through but I think something like what it proposes in the POD is probably
> good approach going forward (not least because this seems to be the
> direction Mart was taking it).
>
> http://github.com/robn/Net-OpenID-Common/blob/master/lib/Net/OpenID/E...
>
> I'm hoping that once I get all this stuff into shape that I can permission
> do an upload to CPAN. I guess it'll really depend on whether what I've done
> looks sane, but I'm hoping that other interested folks like yourself will
> help.
>
> On Tue, Oct 26, 2010 at 12:01 AM, Freaking Wildchild <gunther.v...@gmail.com
> > openid-perl...@googlegroups.com<openid-perl%2Bunsu...@googlegroups.com>
> > .

Robert Norris

unread,
Oct 27, 2010, 3:20:06 AM10/27/10
to openi...@googlegroups.com
Yes, -Common is just moving a few modules into a seperate distribution so that -Server can depend on them without needing all of -Consumer. They have the same names and do the the same things.

To unsubscribe from this group, send email to openid-perl...@googlegroups.com.

Martin Atkins

unread,
Oct 27, 2010, 10:19:16 PM10/27/10
to openi...@googlegroups.com
On 10/25/2010 02:10 PM, Robert Norris wrote:
>
> I'm hoping that once I get all this stuff into shape that I can
> permission do an upload to CPAN. I guess it'll really depend on whether
> what I've done looks sane, but I'm hoping that other interested folks
> like yourself will help.
>

If you want to take over maintainership feel free to ping me privately
and I'll add you as a co-maint on CPAN.

Robert Norris

unread,
Oct 27, 2010, 11:41:10 PM10/27/10
to openi...@googlegroups.com
Thanks Martin. I will do that soon.



--
Reply all
Reply to author
Forward
0 new messages