[Catalyst] OpenID and SREG

Trevor Phillips trevor.phillips at gmail.com
Sat Jul 4 04:13:45 GMT 2009


I've only just started looking at OpenID, and would love to integrate
it with Catalyst apps. Using
Catalyst::Authentication::Credential::OpenID I've got the basics of
Authentication working, but I'm having problems with SREG.

The first problem is when using a .conf config, the docs say you can use:
     <extension_args>
            http://openid.net/extensions/sreg/1.1
            required    email
            optional    fullname,nickname,timezone
     </extension_args>

However, this fails, since this doesn't resolve into an Array, which
is what Net::OpenID::Consumer expects when
Catalyst::Authentication::Credential::OpenID calls set_extension_args.

Ok, so I can get around that by defining my Auth in my Perl module instead...

The next problem is I can't seem to get at the SREG hash. I'm trying
to get the hash using:

$sreg = $c->user->signed_extension_fields(
         'http://openid.net/extensions/sreg/1.1'
      );

...but this just assigns $sreg the string
'http://openid.net/extensions/sreg/1.1'.

Dumps of $c->user don't show anything useful either.

Am I missing something, or is OpenID Extensions for Catalyst currently broken?

-- 
Trevor Phillips  - http://dortamur.livejournal.com/
"On nights such as this, evil deeds are done. And good deeds, of
course. But mostly evil, on the whole."
      -- (Terry Pratchett, Wyrd Sisters)



More information about the Catalyst mailing list