line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OpenID::Lite::RelyingParty::Associator::Base; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
7
|
use Any::Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
4
|
|
|
|
|
|
|
with 'OpenID::Lite::Role::Associator'; |
5
|
|
|
|
|
|
|
with 'OpenID::Lite::Role::AgentHandler'; |
6
|
|
|
|
|
|
|
with 'OpenID::Lite::Role::ErrorHandler'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
1235
|
use OpenID::Lite::RelyingParty::Associator::ParamBuilder; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
8
|
|
9
|
1
|
|
|
1
|
|
678
|
use OpenID::Lite::RelyingParty::Associator::ParamExtractor; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
9
|
|
10
|
1
|
|
|
1
|
|
42
|
use OpenID::Lite::RelyingParty::DirectCommunication; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
has 'session' => ( |
13
|
|
|
|
|
|
|
is => 'rw', |
14
|
|
|
|
|
|
|
isa => 'OpenID::Lite::SessionHandler', |
15
|
|
|
|
|
|
|
required => 1, |
16
|
|
|
|
|
|
|
); |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
has '_direct_communication' => ( |
19
|
|
|
|
|
|
|
is => 'ro', |
20
|
|
|
|
|
|
|
lazy_build => 1, |
21
|
|
|
|
|
|
|
); |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
has '_param_builder' => ( |
24
|
|
|
|
|
|
|
is => 'ro', |
25
|
|
|
|
|
|
|
lazy_build => 1, |
26
|
|
|
|
|
|
|
); |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
has '_param_extractor' => ( |
29
|
|
|
|
|
|
|
is => 'ro', |
30
|
|
|
|
|
|
|
lazy_build => 1, |
31
|
|
|
|
|
|
|
); |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub associate { |
34
|
0
|
|
|
0
|
0
|
|
my ( $self, $service ) = @_; |
35
|
0
|
|
|
|
|
|
my $req_params |
36
|
|
|
|
|
|
|
= $self->_param_builder->build_params( $service, $self->assoc_type ); |
37
|
0
|
0
|
|
|
|
|
my $res_params |
38
|
|
|
|
|
|
|
= $self->_direct_communication->send_request( $service->url, |
39
|
|
|
|
|
|
|
$req_params ) |
40
|
|
|
|
|
|
|
or return $self->ERROR( $self->_direct_communication->errstr ); |
41
|
0
|
0
|
|
|
|
|
my $association = $self->_param_extractor->extract_params($res_params) |
42
|
|
|
|
|
|
|
or return $self->ERROR( $self->_param_extractor->errstr ); |
43
|
0
|
|
|
|
|
|
return $association; |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
sub _build__param_builder { |
47
|
0
|
|
|
0
|
|
|
my $self = shift; |
48
|
0
|
|
|
|
|
|
return OpenID::Lite::RelyingParty::Associator::ParamBuilder->new( |
49
|
|
|
|
|
|
|
session => $self->session, ); |
50
|
|
|
|
|
|
|
} |
51
|
|
|
|
|
|
|
|
52
|
|
|
|
|
|
|
sub _build__param_extractor { |
53
|
0
|
|
|
0
|
|
|
my $self = shift; |
54
|
0
|
|
|
|
|
|
return OpenID::Lite::RelyingParty::Associator::ParamExtractor->new( |
55
|
|
|
|
|
|
|
session => $self->session, ); |
56
|
|
|
|
|
|
|
} |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
sub _build__direct_communication { |
59
|
0
|
|
|
0
|
|
|
my $self = shift; |
60
|
0
|
|
|
|
|
|
return OpenID::Lite::RelyingParty::DirectCommunication->new( |
61
|
|
|
|
|
|
|
agent => $self->agent, ); |
62
|
|
|
|
|
|
|
} |
63
|
|
|
|
|
|
|
|
64
|
1
|
|
|
1
|
|
301
|
no Any::Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
17
|
|
65
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
66
|
|
|
|
|
|
|
1; |
67
|
|
|
|
|
|
|
|