line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package App::PAIA::Command::login; |
2
|
4
|
|
|
4
|
|
1473
|
use strict; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
92
|
|
3
|
4
|
|
|
4
|
|
25
|
use v5.10; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
100
|
|
4
|
4
|
|
|
4
|
|
11
|
use parent 'App::PAIA::Command'; |
|
4
|
|
|
|
|
4
|
|
|
4
|
|
|
|
|
14
|
|
5
|
|
|
|
|
|
|
|
6
|
|
|
|
|
|
|
our $VERSION = '0.30'; |
7
|
|
|
|
|
|
|
|
8
|
|
|
|
|
|
|
sub _execute { |
9
|
3
|
|
|
3
|
|
7
|
my ($self, $opt, $args) = @_; |
10
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
# don't take scope from session |
12
|
3
|
|
33
|
|
|
9
|
my $scope = $self->app->global_options->{scope} # command line |
13
|
|
|
|
|
|
|
// $self->config->get('scope'); # config file |
14
|
|
|
|
|
|
|
|
15
|
3
|
|
|
|
|
22
|
$self->login( $scope ); |
16
|
|
|
|
|
|
|
} |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
1; |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=head1 NAME |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
App::PAIA::Command::login - get a access token and patron identifier |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
=head1 DESCRIPTION |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
requests or renews an access_token from a PAIA auth server |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=cut |