Skip to content

Commit

Permalink
jwt updated
Browse files Browse the repository at this point in the history
  • Loading branch information
hafijul233 committed Mar 30, 2024
1 parent ca68692 commit 5006b2b
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions src/LaravelRequestDocsToOpenApi.php
Original file line number Diff line number Diff line change
Expand Up @@ -204,7 +204,8 @@ protected function appendGlobalSecurityScheme(): void
case 'bearer':
$this->openApi['components']['securitySchemes']['bearerAuth'] = [
'type' => 'http',
'name' => config('request-docs.open_api.security.name', 'Bearer Authorization Token'),
'name' => config('request-docs.open_api.security.name', 'Bearer Token'),
'description' => 'Http Bearer Authorization Token',
'scheme' => 'bearer'
];
$this->openApi['security'][] = [
Expand All @@ -215,7 +216,8 @@ protected function appendGlobalSecurityScheme(): void
case 'basic':
$this->openApi['components']['securitySchemes']['basicAuth'] = [
'type' => 'http',
'name' => config('request-docs.open_api.security.name', 'Basic Authorization Username and Password'),
'name' => config('request-docs.open_api.security.name', 'Basic Username and Password'),
'description' => 'Http Basic Authorization Username and Password',
'scheme' => 'basic'
];
$this->openApi['security'][] = [
Expand All @@ -227,7 +229,8 @@ protected function appendGlobalSecurityScheme(): void
$this->openApi['components']['securitySchemes']['apiKeyAuth'] = [
'type' => 'apiKey',
'name' => config('request-docs.open_api.security.name', 'api_key'),
'in' => config('request-docs.open_api.security.position', 'header')
'in' => config('request-docs.open_api.security.position', 'header'),
'description' => config('app.name').' Provided Authorization Api Key',
];
$this->openApi['security'][] = ['apiKeyAuth' => []];
break;
Expand All @@ -236,8 +239,9 @@ protected function appendGlobalSecurityScheme(): void
$this->openApi['components']['securitySchemes']['bearerAuth'] = [
'type' => 'http',
'scheme' => 'bearer',
'name' => config('request-docs.open_api.security.name', 'Bearer Authorization Token'),
'name' => config('request-docs.open_api.security.name', 'Bearer JWT Token'),
'in' => config('request-docs.open_api.security.position', 'header'),
'description' => 'JSON Web Token',
'bearerFormat' => 'JWT'
];
$this->openApi['security'][] = [
Expand Down

0 comments on commit 5006b2b

Please sign in to comment.