| 1 | package OpenID::Lite::RelyingParty::CheckID::Result; | ||||||||||
| 2 | |||||||||||
| 3 | 1 | ▶ | use Any::Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 4 | 1 | ▶ | use OpenID::Lite::Constants::CheckIDResponse qw(:all); | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 5 | |||||||||||
| 6 | # common properties | ||||||||||
| 7 | 1 | has 'type' => ( | |||||||||
| 8 | is => 'ro', | ||||||||||
| 9 | isa => 'Str', | ||||||||||
| 10 | required => 1, | ||||||||||
| 11 | ); | ||||||||||
| 12 | |||||||||||
| 13 | 1 | has 'params' => ( | |||||||||
| 14 | is => 'ro', | ||||||||||
| 15 | isa => 'OpenID::Lite::Message', | ||||||||||
| 16 | required => 1, | ||||||||||
| 17 | ); | ||||||||||
| 18 | |||||||||||
| 19 | 1 | has 'message' => ( | |||||||||
| 20 | is => 'ro', | ||||||||||
| 21 | isa => 'Str', | ||||||||||
| 22 | default => '', | ||||||||||
| 23 | ); | ||||||||||
| 24 | |||||||||||
| 25 | # used under error status | ||||||||||
| 26 | 1 | has 'contact' => ( | |||||||||
| 27 | is => 'ro', | ||||||||||
| 28 | isa => 'Str', | ||||||||||
| 29 | default => '', | ||||||||||
| 30 | ); | ||||||||||
| 31 | |||||||||||
| 32 | 1 | has 'reference' => ( | |||||||||
| 33 | is => 'ro', | ||||||||||
| 34 | isa => 'Str', | ||||||||||
| 35 | default => '', | ||||||||||
| 36 | ); | ||||||||||
| 37 | |||||||||||
| 38 | # used under setup_needed status | ||||||||||
| 39 | 1 | has 'url' => ( | |||||||||
| 40 | is => 'ro', | ||||||||||
| 41 | isa => 'Str', | ||||||||||
| 42 | predicate => 'has_url', | ||||||||||
| 43 | ); | ||||||||||
| 44 | |||||||||||
| 45 | # used under successful status | ||||||||||
| 46 | |||||||||||
| 47 | 1 | has 'service' => ( | |||||||||
| 48 | is => 'rw', | ||||||||||
| 49 | isa => 'OpenID::Lite::RelyingParty::Discover::Service', | ||||||||||
| 50 | ); | ||||||||||
| 51 | |||||||||||
| 52 | =pod | ||||||||||
| 53 | has 'claimed_identifier' => ( | ||||||||||
| 54 | is => 'ro', | ||||||||||
| 55 | isa => 'Str', | ||||||||||
| 56 | ); | ||||||||||
| 57 | |||||||||||
| 58 | has 'identity' => ( | ||||||||||
| 59 | is => 'ro', | ||||||||||
| 60 | isa => 'Str', | ||||||||||
| 61 | ); | ||||||||||
| 62 | =cut | ||||||||||
| 63 | |||||||||||
| 64 | |||||||||||
| 65 | 0 | ▶ | sub display_identifier { | ||||||||
|
Subroutine
display_identifier: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 66 | 0 | my $self = shift; | |||||||||
| 67 | 0 | ▶ | return $self->service ? $self->service->display_identifier : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 68 | } | ||||||||||
| 69 | |||||||||||
| 70 | 0 | ▶ | sub identity_url { | ||||||||
|
Subroutine
identity_url: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||
| 71 | 0 | my $self = shift; | |||||||||
| 72 | 0 | ▶ | return $self->service ? $self->service->claimed_identifier : undef; | ||||||||
|
Branch: 1 branch
| |||||||||||
| 73 | } | ||||||||||
| 74 | |||||||||||
| 75 | 0 | ▶ | sub is_invalid { | ||||||||
|
Subroutine
is_invalid: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 76 | 0 | my $self = shift; | |||||||||
| 77 | 0 | return $self->type eq IS_INVALID; | |||||||||
| 78 | } | ||||||||||
| 79 | |||||||||||
| 80 | 0 | ▶ | sub is_error { | ||||||||
|
Subroutine
is_error: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 81 | 0 | my $self = shift; | |||||||||
| 82 | 0 | return $self->type eq IS_ERROR; | |||||||||
| 83 | } | ||||||||||
| 84 | |||||||||||
| 85 | 0 | ▶ | sub is_canceled { | ||||||||
|
Subroutine
is_canceled: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 86 | 0 | my $self = shift; | |||||||||
| 87 | 0 | return $self->type eq IS_CANCELED; | |||||||||
| 88 | } | ||||||||||
| 89 | |||||||||||
| 90 | 0 | ▶ | sub is_setup_needed { | ||||||||
|
Subroutine
is_setup_needed: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 91 | 0 | my $self = shift; | |||||||||
| 92 | 0 | return $self->type eq IS_SETUP_NEEDED; | |||||||||
| 93 | } | ||||||||||
| 94 | |||||||||||
| 95 | 0 | ▶ | sub is_success { | ||||||||
|
Subroutine
is_success: not called CC=1 SCAR=6.9
Pod
undocumented
| |||||||||||
| 96 | 0 | my $self = shift; | |||||||||
| 97 | 0 | return $self->type eq IS_SUCCESS; | |||||||||
| 98 | } | ||||||||||
| 99 | |||||||||||
| 100 | 1 | ▶ | no Any::Moose; | ||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||
| 101 | 1 | __PACKAGE__->meta->make_immutable; | |||||||||
| 102 | 1 | 1; | |||||||||
| 103 | |||||||||||