| 1 | package OpenID::Lite::SessionHandler; | ||||||||||||||||||||
| 2 | |||||||||||||||||||||
| 3 | 1 | ▶ | use Any::Moose; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 4 | 1 | with 'OpenID::Lite::Role::ErrorHandler'; | |||||||||||||||||||
| 5 | 1 | ▶ | use List::MoreUtils qw(any); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 6 | 1 | ▶ | use OpenID::Lite::Types qw(SessionType); | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 7 | |||||||||||||||||||||
| 8 | 1 | has '_session_type' => ( | |||||||||||||||||||
| 9 | is => 'ro', | ||||||||||||||||||||
| 10 | isa => SessionType, | ||||||||||||||||||||
| 11 | default => "", | ||||||||||||||||||||
| 12 | ); | ||||||||||||||||||||
| 13 | |||||||||||||||||||||
| 14 | has '_allowed_assoc_types' => ( | ||||||||||||||||||||
| 15 | is => 'ro', | ||||||||||||||||||||
| 16 | isa => 'ArrayRef[Str]', | ||||||||||||||||||||
| 17 | 0 | ▶ | default => sub { [] }, | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
| |||||||||||||||||||||
| 18 | 1 | ); | |||||||||||||||||||
| 19 | |||||||||||||||||||||
| 20 | # template method | ||||||||||||||||||||
| 21 | 0 | ▶ | sub set_request_params { | ||||||||||||||||||
|
Subroutine
set_request_params: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 22 | 0 | my ( $self, $service, $params ) = @_; | |||||||||||||||||||
| 23 | } | ||||||||||||||||||||
| 24 | |||||||||||||||||||||
| 25 | 0 | ▶ | sub match { | ||||||||||||||||||
|
Subroutine
match: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 26 | 0 | my ( $self, $session_type ) = @_; | |||||||||||||||||||
| 27 | 0 | ▶ | return ( $session_type && $self->_session_type eq $session_type ); | ||||||||||||||||||
|
Condition0%0/3
$session_type && $self->_session_type eq $session_type
MC/DC0%0/2
$session_type && $self->_session_type eq $session_type
$session_type
$self->_session_type eq $session_type
Truth table0%0/3
A && B
A= $session_typeB= $self->_session_type eq $session_type
| |||||||||||||||||||||
| 28 | } | ||||||||||||||||||||
| 29 | |||||||||||||||||||||
| 30 | 0 | ▶ | sub can_handle_assoc_type { | ||||||||||||||||||
|
Subroutine
can_handle_assoc_type: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||||||||||
| 31 | 0 | my ( $self, $assoc_type ) = @_; | |||||||||||||||||||
| 32 | 0 | my $allowed = $self->_allowed_assoc_types; | |||||||||||||||||||
| 33 | 0 | ▶ | return ( $assoc_type && ( any { $_ eq $assoc_type } @$allowed ) ); | ||||||||||||||||||
|
Subroutine
__ANON__: not called CC=1 SCAR=6.9
Condition0%0/3
$assoc_type && &any(sub {
$_ eq $assoc_type;
}
, @$allowed)
MC/DC0%0/2
$assoc_type && &any(sub {
$_ eq $assoc_type;
}
, @$allowed)
$assoc_type
&any(sub {
$_ eq $assoc_type;
}
, @$allowed)
Truth table0%0/3
A && B
A= $assoc_typeB= &any(sub {
$_ eq $assoc_type;
}
, @$allowed)
| |||||||||||||||||||||
| 34 | } | ||||||||||||||||||||
| 35 | |||||||||||||||||||||
| 36 | # abstract method | ||||||||||||||||||||
| 37 | 0 | ▶ | sub extract_secret { | ||||||||||||||||||
|
Subroutine
extract_secret: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 38 | 0 | my ( $self, $params ) = @_; | |||||||||||||||||||
| 39 | 0 | die "abstract method."; | |||||||||||||||||||
| 40 | } | ||||||||||||||||||||
| 41 | |||||||||||||||||||||
| 42 | 0 | ▶ | sub set_response_params { | ||||||||||||||||||
|
Subroutine
set_response_params: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||||||||||||
| 43 | 0 | my ( $self, $req_params, $res_params, $association ) = @_; | |||||||||||||||||||
| 44 | 0 | die "abstract method"; | |||||||||||||||||||
| 45 | } | ||||||||||||||||||||
| 46 | |||||||||||||||||||||
| 47 | 1 | ▶ | no Any::Moose; | ||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||
| 48 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||||||||||||
| 49 | 1 | 1; | |||||||||||||||||||
| 50 | |||||||||||||||||||||
| 51 | |||||||||||||||||||||