| 1 | # Copyrights 2013-2019 by [Mark Overmeer <markov@cpan.org>]. | ||||||||||||
| 2 | # For other contributors see ChangeLog. | ||||||||||||
| 3 | # See the manual pages for details on the licensing terms. | ||||||||||||
| 4 | # Pod stripped from pm file by OODoc 2.02. | ||||||||||||
| 5 | # This code is part of distribution Net-OAuth2. Meta-POD processed | ||||||||||||
| 6 | # with OODoc into POD and HTML manual-pages. See README.md | ||||||||||||
| 7 | # Copyright Mark Overmeer. Licensed under the same terms as Perl itself. | ||||||||||||
| 8 | |||||||||||||
| 9 | package Net::OAuth2::Profile::Password; | ||||||||||||
| 10 | 1 | ▶ | use vars '$VERSION'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 11 | 1 | $VERSION = '0.67'; | |||||||||||
| 12 | |||||||||||||
| 13 | 1 | ▶ | use base 'Net::OAuth2::Profile'; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 14 | |||||||||||||
| 15 | 1 | ▶ | use warnings; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 16 | 1 | ▶ | use strict; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 17 | |||||||||||||
| 18 | 1 | ▶ | use URI; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 19 | 1 | ▶ | use Net::OAuth2::AccessToken; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 20 | 1 | ▶ | use HTTP::Request; | ||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||
| 21 | |||||||||||||
| 22 | |||||||||||||
| 23 | sub init($) | ||||||||||||
| 24 | 0 | ▶ | { my ($self, $args) = @_; | ||||||||||
|
Subroutine
init: not called CC=2 SCAR=17.9
Pod
undocumented
| |||||||||||||
| 25 | 0 | ▶ | $args->{grant_type} ||= 'password'; | ||||||||||
|
Condition0%0/2
$args->{"grant_type"} ||= "password"
MC/DC0%0/1
$args->{"grant_type"} ||= "password"
$args->{"grant_type"}
Truth table0%0/2
A
A= $args->{"grant_type"}
| |||||||||||||
| 26 | 0 | $self->SUPER::init($args); | |||||||||||
| 27 | 0 | $self; | |||||||||||
| 28 | } | ||||||||||||
| 29 | |||||||||||||
| 30 | #------------------- | ||||||||||||
| 31 | |||||||||||||
| 32 | #-------------------- | ||||||||||||
| 33 | |||||||||||||
| 34 | |||||||||||||
| 35 | sub get_access_token(@) | ||||||||||||
| 36 | 0 | ▶ | { my $self = shift; | ||||||||||
|
Subroutine
get_access_token: not called CC=1 SCAR=6.9
Pod
documented
| |||||||||||||
| 37 | |||||||||||||
| 38 | 0 | my $request = $self->build_request | |||||||||||
| 39 | ( $self->access_token_method | ||||||||||||
| 40 | , $self->access_token_url | ||||||||||||
| 41 | , $self->access_token_params(@_) | ||||||||||||
| 42 | ); | ||||||||||||
| 43 | |||||||||||||
| 44 | 0 | my $response = $self->request($request); | |||||||||||
| 45 | |||||||||||||
| 46 | 0 | Net::OAuth2::AccessToken->new(client => $self | |||||||||||
| 47 | , $self->params_from_response($response, 'access token')); | ||||||||||||
| 48 | } | ||||||||||||
| 49 | |||||||||||||
| 50 | 1 | 1; | |||||||||||