Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

the key for clientAuthorizations.add must be the same as the one of the SecurityDefinition #134

Merged
merged 1 commit into from
Oct 25, 2017
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ var abp = abp || {};
return false;
}
var cookieAuth = new SwaggerClient.ApiKeyAuthorization(abp.auth.tokenHeaderName, 'Bearer ' + authToken, 'header');
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@acjh I'm talking about this line. Here the headername gets set.

swaggerUi.api.clientAuthorizations.add(abp.auth.tokenHeaderName, cookieAuth);
swaggerUi.api.clientAuthorizations.add('bearerAuth', cookieAuth);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

And here the header gets added to the clientAuthorizations of the swaggerui api. The key here is not necessarily the same as the headername. See swagger-api/swagger-ui#1244 (comment) for a more in depth explanation.

return true;
}

Expand Down