line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OpenID::Lite::RelyingParty::Discover; |
2
|
|
|
|
|
|
|
|
3
|
1
|
|
|
1
|
|
5
|
use Any::Moose; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
10
|
|
4
|
|
|
|
|
|
|
with 'OpenID::Lite::Role::ErrorHandler'; |
5
|
|
|
|
|
|
|
with 'OpenID::Lite::Role::Discoverer'; |
6
|
|
|
|
|
|
|
with 'OpenID::Lite::Role::AgentHandler'; |
7
|
|
|
|
|
|
|
|
8
|
1
|
|
|
1
|
|
659
|
use OpenID::Lite::RelyingParty::Discover::Method::XRI; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
use OpenID::Lite::RelyingParty::Discover::Method::URL; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
sub discover { |
12
|
|
|
|
|
|
|
my ( $self, $identity ) = @_; |
13
|
|
|
|
|
|
|
my $disco = $self->create_method_for( $identity ); |
14
|
|
|
|
|
|
|
return $disco->discover( $identity ) |
15
|
|
|
|
|
|
|
|| $self->ERROR( $disco->errstr ); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# factory method |
19
|
|
|
|
|
|
|
sub create_method_for { |
20
|
|
|
|
|
|
|
my ( $self, $identity ) = @_; |
21
|
|
|
|
|
|
|
my $disco |
22
|
|
|
|
|
|
|
= $identity->is_xri |
23
|
|
|
|
|
|
|
? OpenID::Lite::RelyingParty::Discover::Method::XRI->new( |
24
|
|
|
|
|
|
|
agent => $self->agent ) |
25
|
|
|
|
|
|
|
: OpenID::Lite::RelyingParty::Discover::Method::URL->new( |
26
|
|
|
|
|
|
|
agent => $self->agent ); |
27
|
|
|
|
|
|
|
return $disco; |
28
|
|
|
|
|
|
|
} |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
no Any::Moose; |
31
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
32
|
|
|
|
|
|
|
1; |
33
|
|
|
|
|
|
|
|