
apv at sedition
Jul 3, 2009, 11:02 PM
Post #2 of 6
(1334 views)
Permalink
|
On Jul 3, 2009, at 9:13 PM, Trevor Phillips wrote: > 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? The configuration examples are bad. Menno Blom provided the patch to support the stuff and I documented it incorrectly. I'm really sorry about this; it's been this way for a long time. I've been trying just this week to get a new release but I was also trying to run deeper tests to make sure I don't make another faux pas and I've been having problems getting them together and LWPx::ParanoidAgent is still broken and my excuse machine is on the fritz. The snippet below (unedited, it's better to not use the config->{} = assignment idiom) is from a recent report from Orlando Vazquez who got it running in spite of the bad doc. There was also an issue with Config::General being a PITA regarding the data structure so you might want to start with a pure Perl config and if it runs, then put it into your favored config file format. -Ashley > __PACKAGE__->config->{Plugin::Authentication} = { > use_session => 1, > default_realm => 'openid', > realms => { > openid => { > credential => { > class => 'OpenID', > store => { > class => 'OpenID' > } > }, > ### need this to get registration fields > extensions => { > 'http://openid.net/extensions/sreg/1.1' => 1 > }, > extension_args => [ > 'http://openid.net/extensions/sreg/1.1', > { > required => 'email,timezone', > optional => 'fullname,nickname,timezone' > } > ] > } > } > }; _______________________________________________ List: Catalyst [at] lists Listinfo: http://lists.scsys.co.uk/cgi-bin/mailman/listinfo/catalyst Searchable archive: http://www.mail-archive.com/catalyst [at] lists/ Dev site: http://dev.catalyst.perl.org/
|