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