Skip to content

Commit

Permalink
fix: Default to Authorization header when auth type is http (#94)
Browse files Browse the repository at this point in the history
Co-authored-by: Lukasz Gornicki <[email protected]>
  • Loading branch information
anbreaker and derberg authored Oct 8, 2020
1 parent ce1eb06 commit 17193ef
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
3 changes: 2 additions & 1 deletion partials/servers.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,8 @@ <h5 class="text-sm text-grey mt-1">Security:</h5>

{% if def.bearerFormat() %}
<span class="font-bold no-underline bg-blue-light text-white text-xs uppercase rounded"
style="height: 20px;font-size: 11px;padding: 3px;">Header: {{def.name()}}</span>
style="height: 20px;font-size: 11px;padding: 3px;">Header: Authorization
</span>
{% endif %}

{% if def.openIdConnectUrl() %}
Expand Down
7 changes: 7 additions & 0 deletions test/spec/asyncapi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ servers:
enum:
- '1883'
- '8883'
security:
- bearerAuth: []

defaultContentType: application/json

Expand Down Expand Up @@ -171,6 +173,11 @@ components:
description: Date and time when the message was sent.

securitySchemes:
bearerAuth:
type: http
scheme: bearer
bearerFormat: JWT
description: The JWT for authorizing against the backend. Needs to be obtained through the authentication route.
apiKey:
type: apiKey
in: user
Expand Down

0 comments on commit 17193ef

Please sign in to comment.