improvements to login/logout for API

This commit is contained in:
Oliver Gorwits
2019-01-01 10:56:09 +00:00
parent 3b0a9f6310
commit f362b0aee3
2 changed files with 33 additions and 7 deletions

View File

@@ -77,8 +77,12 @@ my $swagger = Dancer::Plugin::Swagger->instance->doc;
$swagger->{schemes} = ['http','https'];
$swagger->{consumes} = 'application/json';
$swagger->{produces} = 'application/json';
$swagger->{securityDefinitions} = { APIKeyHeader =>
{ type => 'apiKey', name => 'Authorization', in => 'header' } };
$swagger->{securityDefinitions} = {
APIKeyHeader =>
{ type => 'apiKey', name => 'Authorization', in => 'header' },
BasicAuth =>
{ type => 'basic' },
};
$swagger->{security} = [ { APIKeyHeader => [] } ];
# workaround for https://github.com/PerlDancer/Dancer/issues/935