[Catalyst-commits] r13655 - in
Catalyst-Authentication-Credential-OpenID/trunk: .
lib/Catalyst/Authentication/Credential
apv at dev.catalyst.perl.org
apv at dev.catalyst.perl.org
Sat Oct 16 02:03:38 GMT 2010
Author: apv
Date: 2010-10-16 02:03:38 +0000 (Sat, 16 Oct 2010)
New Revision: 13655
Modified:
Catalyst-Authentication-Credential-OpenID/trunk/Changes
Catalyst-Authentication-Credential-OpenID/trunk/lib/Catalyst/Authentication/Credential/OpenID.pm
Log:
Option to fold extention keys/vals into user object.
Modified: Catalyst-Authentication-Credential-OpenID/trunk/Changes
===================================================================
--- Catalyst-Authentication-Credential-OpenID/trunk/Changes 2010-10-12 14:29:13 UTC (rev 13654)
+++ Catalyst-Authentication-Credential-OpenID/trunk/Changes 2010-10-16 02:03:38 UTC (rev 13655)
@@ -1,6 +1,11 @@
Revision history for Catalyst::Authentication::Credential::OpenID
-0.16_01 Tue Apr 6 19:50:55 PDT 2010
+0.16_02 Fri Oct 15 18:54:24 PDT 2010
+ - Experimental, undocumented flatten_extensions_into_user added
+ which flattens the namespaced key vals from extensions into
+ the user object.
+
+0.16_01 Tue Apr 6 19:50:55 PDT 2010
- extension_args are no longer honored as deprecated synonym for
extensions.
- extensions is now a hash ref which facilitates multiple
Modified: Catalyst-Authentication-Credential-OpenID/trunk/lib/Catalyst/Authentication/Credential/OpenID.pm
===================================================================
--- Catalyst-Authentication-Credential-OpenID/trunk/lib/Catalyst/Authentication/Credential/OpenID.pm 2010-10-12 14:29:13 UTC (rev 13654)
+++ Catalyst-Authentication-Credential-OpenID/trunk/lib/Catalyst/Authentication/Credential/OpenID.pm 2010-10-16 02:03:38 UTC (rev 13655)
@@ -13,9 +13,10 @@
errors_are_fatal
extensions
trust_root
+ flatten_extensions_into_user
/);
-our $VERSION = "0.16_01";
+our $VERSION = "0.16_02";
use Net::OpenID::Consumer;
use Catalyst::Exception ();
@@ -130,10 +131,14 @@
my $user = +{ map { $_ => scalar $identity->$_ }
qw( url display rss atom foaf declared_rss declared_atom declared_foaf foafmaker ) };
# Dude, I did not design the array as hash spec. Don't curse me [apv].
-
for my $key ( keys %extensions )
{
- $user->{extensions}->{$key} = $identity->signed_extension_fields($key);
+ my $vals = $identity->signed_extension_fields($key);
+ $user->{extensions}->{$key} = $vals;
+ if ( $self->flatten_extensions_into_user )
+ {
+ $user->{$_} = $vals->{$_} for keys %{$vals};
+ }
}
my $user_obj = $realm->find_user($user, $c);
More information about the Catalyst-commits
mailing list