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

[typescript-axios] Fix Bearer authentication #2578

Merged
merged 2 commits into from
Apr 4, 2019
Merged
Changes from 1 commit
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 @@ -74,12 +74,18 @@ export const {{classname}}AxiosParamCreator = function (configuration?: Configur
}
{{/isKeyInQuery}}
{{/isApiKey}}
{{#isBasic}}
{{#isBasicBasic}}
// http basic authentication required
if (configuration && (configuration.username || configuration.password)) {
localVarHeaderParameter["Authorization"] = "Basic " + btoa(configuration.username + ":" + configuration.password);
}
{{/isBasic}}
{{/isBasicBasic}}
{{#isBasicBearer}}
// http bearer authentication required
if (configuration && configuration.password) {
localVarHeaderParameter["Authorization"] = "Bearer " + btoa(configuration.password);
hectorj marked this conversation as resolved.
Show resolved Hide resolved
}
{{/isBasicBearer}}
{{#isOAuth}}
// oauth required
if (configuration && configuration.accessToken) {
Expand Down