forked from loafle/openapi-generator-original
add auth sample code to perl, add links to readme, etc
This commit is contained in:
@@ -333,6 +333,12 @@ sub update_params_for_auth {
|
||||
$header_params->{'api_key'} = $api_key;
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'test_http_basic') {
|
||||
|
||||
if ($WWW::SwaggerClient::Configuration::username || $WWW::SwaggerClient::Configuration::password) {
|
||||
$header_params->{'Authorization'} = 'Basic ' . encode_base64($WWW::SwaggerClient::Configuration::username . ":" . $WWW::SwaggerClient::Configuration::password);
|
||||
}
|
||||
}
|
||||
elsif ($auth eq 'test_api_client_secret') {
|
||||
|
||||
my $api_key = $self->get_api_key_with_prefix('x-test_api_client_secret');
|
||||
|
||||
@@ -37,7 +37,7 @@ has version_info => ( is => 'ro',
|
||||
default => sub { {
|
||||
app_name => 'Swagger Petstore',
|
||||
app_version => '1.0.0',
|
||||
generated_date => '2016-03-12T17:06:52.449+08:00',
|
||||
generated_date => '2016-03-13T22:43:11.863+08:00',
|
||||
generator_class => 'class io.swagger.codegen.languages.PerlClientCodegen',
|
||||
} },
|
||||
documentation => 'Information about the application version and the codegen codebase version'
|
||||
@@ -103,7 +103,7 @@ Automatically generated by the Perl Swagger Codegen project:
|
||||
|
||||
=over 4
|
||||
|
||||
=item Build date: 2016-03-12T17:06:52.449+08:00
|
||||
=item Build date: 2016-03-13T22:43:11.863+08:00
|
||||
|
||||
=item Build package: class io.swagger.codegen.languages.PerlClientCodegen
|
||||
|
||||
|
||||
@@ -307,7 +307,7 @@ sub delete_user {
|
||||
|
||||
|
||||
# authentication setting, if any
|
||||
my $auth_settings = [qw()];
|
||||
my $auth_settings = [qw(test_http_basic )];
|
||||
|
||||
# make the API Call
|
||||
|
||||
|
||||
Reference in New Issue
Block a user