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