Skip to content

Commit

Permalink
Merge pull request #180 from anilpai/anilpai-patch-1
Browse files Browse the repository at this point in the history
Authorization header using the Bearer schema
  • Loading branch information
rochacbruno committed Feb 19, 2018
2 parents 6832b2c + b6e314a commit 32132f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion flasgger/ui2/templates/flasgger/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
var tokenField = 'jwt-token';
if (response.hasOwnProperty(tokenField)) {
var jwt_token = response[tokenField];
swaggerUi.api.clientAuthorizations.add("key", new SwaggerClient.ApiKeyAuthorization("Authorization", "JWT " + jwt_token, "header"));
swaggerUi.api.clientAuthorizations.add("key", new SwaggerClient.ApiKeyAuthorization("Authorization", "Bearer " + jwt_token, "header"));
}
});
{%- endif %}
Expand Down
2 changes: 1 addition & 1 deletion flasgger/ui3/templates/flasgger/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@
{% if config.JWT_AUTH_URL_RULE -%}
requestInterceptor: function(request) {
if (jwt_token) {
request.headers.Authorization = "JWT " + jwt_token;
request.headers.Authorization = "Bearer " + jwt_token;
}

return request;
Expand Down

0 comments on commit 32132f3

Please sign in to comment.