Skip to content

Commit

Permalink
[javascript] fix use of isBasicBasic and isBasicBearer conditions (#1…
Browse files Browse the repository at this point in the history
  • Loading branch information
tiffmaelite committed May 16, 2023
1 parent 1c6decb commit 016507c
Show file tree
Hide file tree
Showing 6 changed files with 14 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -204,11 +204,17 @@ Class | Method | HTTP request | Description
{{/isApiKey}}
{{#isBasic}}
{{#isBasicBasic}}

- **Type**: HTTP basic authentication
{{/isBasicBasic}}
{{#isBasicBearer}}

- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
{{/isBasicBearer}}
{{#isHttpSignature}}

- **Type**: HTTP signature authentication
{{/isHttpSignature}}
{{/isBasic}}
{{#isOAuth}}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,12 @@ export const {{classname}}FetchParamCreator = 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}}
{{#isOAuth}}
// oauth required
if (configuration && configuration.accessToken) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -209,6 +209,9 @@ Class | Method | HTTP request | Description
{{#isBasicBearer}}
- **Type**: Bearer authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
{{/isBasicBearer}}
{{#isHttpSignature}}
- **Type**: HTTP signature authentication
{{/isHttpSignature}}
{{/isBasic}}
{{#isOAuth}}

Expand Down
1 change: 1 addition & 0 deletions samples/client/petstore/javascript-apollo/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,5 @@ Authentication schemes defined for the API:

### http_signature_test

- **Type**: HTTP signature authentication

1 change: 1 addition & 0 deletions samples/client/petstore/javascript-es6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -258,4 +258,5 @@ Authentication schemes defined for the API:

### http_signature_test

- **Type**: HTTP signature authentication

1 change: 1 addition & 0 deletions samples/client/petstore/javascript-promise-es6/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -256,4 +256,5 @@ Authentication schemes defined for the API:

### http_signature_test

- **Type**: HTTP signature authentication

0 comments on commit 016507c

Please sign in to comment.