line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OpenID::Lite::Message::Decoder::Hash; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
662
|
use Any::Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
6
|
|
4
|
1
|
|
|
1
|
|
484
|
use OpenID::Lite::Message; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
18
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
sub decode { |
7
|
0
|
|
|
0
|
0
|
|
my ( $self, $hash ) = @_; |
8
|
0
|
|
|
|
|
|
my $message = OpenID::Lite::Message->new; |
9
|
0
|
|
|
|
|
|
for my $key (%$hash) { |
10
|
0
|
0
|
|
|
|
|
if ( $key =~ /^openid\.(.+)$/ ) { |
|
|
0
|
|
|
|
|
|
11
|
0
|
|
|
|
|
|
$message->set( $1, $hash->{$key} ); |
12
|
|
|
|
|
|
|
} |
13
|
|
|
|
|
|
|
elsif ( $key =~ /^openid\.(.+)\.(.+)$/ ) { |
14
|
0
|
|
|
|
|
|
my $ext_name = $1; |
15
|
0
|
|
|
|
|
|
my $ext_key = $2; |
16
|
0
|
0
|
|
|
|
|
if ( $ext_name eq 'ns' ) { |
17
|
0
|
|
|
|
|
|
$message->register_extension_namespace( $ext_key, |
18
|
|
|
|
|
|
|
$hash->{$key} ); |
19
|
|
|
|
|
|
|
} |
20
|
|
|
|
|
|
|
else { |
21
|
0
|
|
|
|
|
|
$message->set_extension( $ext_name, $ext_key, $hash->{$key} ); |
22
|
|
|
|
|
|
|
} |
23
|
|
|
|
|
|
|
} |
24
|
|
|
|
|
|
|
else { |
25
|
0
|
|
|
|
|
|
$message->set_extra( $key, $hash->{$key} ); |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
} |
28
|
0
|
|
|
|
|
|
return $message; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
1
|
|
|
1
|
|
224
|
no Any::Moose; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
5
|
|
32
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
33
|
|
|
|
|
|
|
1; |
34
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
|