File Coverage

blib/lib/OpenID/Lite/RelyingParty/Associator/ParamBuilder.pm
Criterion Covered Total %
statement 15 23 65.2
branch 0 2 0.0
condition n/a
subroutine 5 6 83.3
pod 0 1 0.0
total 20 32 62.5


line stmt bran cond sub pod time code
1             package OpenID::Lite::RelyingParty::Associator::ParamBuilder;
2              
3 1     1   5 use Any::Moose;
  1         2  
  1         7  
4             with 'OpenID::Lite::Role::ErrorHandler';
5              
6             has 'session' => (
7             is => 'rw',
8             isa => 'OpenID::Lite::SessionHandler',
9             required => 1,
10             );
11              
12 1     1   751 use OpenID::Lite::Message;
  1         1  
  1         10  
13 1     1   69 use OpenID::Lite::Constants::Namespace qw(SPEC_2_0);
  1         3  
  1         65  
14 1     1   7 use OpenID::Lite::Constants::ModeType qw(ASSOCIATION);
  1         2  
  1         186  
15              
16             sub build_params {
17 0     0 0   my ( $self, $service, $assoc_type ) = @_;
18 0           my $params = OpenID::Lite::Message->new;
19 0 0         unless ( $service->requires_compatibility_mode ) {
20 0           $params->set( ns => SPEC_2_0 );
21             }
22 0           $params->set( mode => ASSOCIATION );
23 0           $params->set( assoc_type => $assoc_type );
24 0           $self->session->set_request_params( $service, $params );
25 0           return $params;
26             }
27              
28 1     1   6 no Any::Moose;
  1         2  
  1         6  
29             __PACKAGE__->meta->make_immutable;
30             1;
31