line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package OpenID::Lite::RelyingParty::Discover::Method::XRI; |
2
|
1
|
|
|
1
|
|
7
|
use Any::Moose; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
8
|
|
3
|
|
|
|
|
|
|
extends 'OpenID::Lite::RelyingParty::Discover::Method::Base'; |
4
|
|
|
|
|
|
|
|
5
|
1
|
|
|
1
|
|
1438
|
use OpenID::Lite::RelyingParty::Discover::Fetcher::XRI; |
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
use OpenID::Lite::RelyingParty::Discover::Parser::XRI; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
use OpenID::Lite::Constants::Namespace qw( |
9
|
|
|
|
|
|
|
SERVER_2_0 |
10
|
|
|
|
|
|
|
SIGNON_2_0 |
11
|
|
|
|
|
|
|
SIGNON_1_1 |
12
|
|
|
|
|
|
|
SIGNON_1_0 |
13
|
|
|
|
|
|
|
); |
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
override 'discover' => sub { |
16
|
|
|
|
|
|
|
my ( $self, $identifier ) = @_; |
17
|
|
|
|
|
|
|
my @services; |
18
|
|
|
|
|
|
|
for |
19
|
|
|
|
|
|
|
my $service_type ( SERVER_2_0, SIGNON_2_0, SIGNON_1_1, SIGNON_1_0 ) |
20
|
|
|
|
|
|
|
{ |
21
|
|
|
|
|
|
|
my $services |
22
|
|
|
|
|
|
|
= super( $identifier, { service_type => $service_type } ); |
23
|
|
|
|
|
|
|
next |
24
|
|
|
|
|
|
|
unless ($services && @$services > 0); |
25
|
|
|
|
|
|
|
push @services, @$services; |
26
|
|
|
|
|
|
|
} |
27
|
|
|
|
|
|
|
return $self->ERROR( sprintf q{No Service Found for %s}, |
28
|
|
|
|
|
|
|
$identifier->as_string ) |
29
|
|
|
|
|
|
|
unless @services > 0; |
30
|
|
|
|
|
|
|
return \@services; |
31
|
|
|
|
|
|
|
}; |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
override '_build__fetcher' => sub { |
34
|
|
|
|
|
|
|
my $self = shift; |
35
|
|
|
|
|
|
|
return OpenID::Lite::RelyingParty::Discover::Fetcher::XRI->new( |
36
|
|
|
|
|
|
|
agent => $self->agent ); |
37
|
|
|
|
|
|
|
}; |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
override '_build__parser' => sub { |
40
|
|
|
|
|
|
|
my $self = shift; |
41
|
|
|
|
|
|
|
return OpenID::Lite::RelyingParty::Discover::Parser::XRI->new; |
42
|
|
|
|
|
|
|
}; |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
no Any::Moose; |
45
|
|
|
|
|
|
|
__PACKAGE__->meta->make_immutable; |
46
|
|
|
|
|
|
|
1; |
47
|
|
|
|
|
|
|
|