forked from loafle/openapi-generator-original
add oauth2 support for Perl
This commit is contained in:
@@ -327,7 +327,7 @@ sub update_params_for_auth {
|
||||
}
|
||||
elsif ($auth eq 'petstore_auth') {
|
||||
|
||||
# TODO support oauth
|
||||
$header_params->{'Authorization'} = 'Bearer ' . $WWW::SwaggerClient::Configuration::access_token;
|
||||
}
|
||||
|
||||
else {
|
||||
|
||||
@@ -17,8 +17,12 @@ our $http_user_agent = 'Perl-Swagger';
|
||||
# authenticaiton setting
|
||||
our $api_key = {};
|
||||
our $api_key_prefix = {};
|
||||
our $username;
|
||||
our $password;
|
||||
|
||||
# username and password for HTTP basic authentication
|
||||
our $username = '';
|
||||
our $password = '';
|
||||
|
||||
# access token for OAuth
|
||||
our $access_token = '';
|
||||
|
||||
1;
|
||||
|
||||
Reference in New Issue
Block a user