App-PAIA
view release on metacpan - search on metacpan
view release on metacpan or search on metacpan
Call C<< paia help <command> >> for help on a specific PAIA command. Note that
PAIA servers do not need to support all PAIA commands.
=head2 PAIA auth
=over
=item B<login> (<http://gbv.github.io/paia/paia.html#login>)
Get a access token and patron identifier from credentials (username and
password). On success access token, patron identifier and base URL are stored
to a session file.
=item B<logout> (<http://gbv.github.io/paia/paia.html#logout>)
Invalidate an access token. An existing session file is deleted.
=item B<change> (<http://gbv.github.io/paia/paia.html#change>)
Change login password.
lib/App/PAIA/Command.pm view on Meta::CPAN
sub login {
my ($self, $scope) = @_;
if ($self->session->purge) {
$self->session->file(undef);
$self->logger->("deleted session file");
}
my $auth = $self->auth or $self->usage_error("missing PAIA auth server URL");
# take credentials from command line or config file only
my %params = (
username => $self->username,
password => $self->password,
grant_type => 'password',
);
if (defined $scope) {
$scope =~ s/,/ /g;
$params{scope} = $scope;
}
view all matches for this distributionview release on metacpan - search on metacpan
( run in 0.555 second using v1.00-cache-2.02-grep-82fe00e-cpan-2c419f77a38b )