[android] fix use of isBasic condition (#15528)

This commit is contained in:
Tiffany Marrel 2023-05-20 14:08:18 +02:00 committed by GitHub
parent b7546888d1
commit 9d6f80a7cf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 8 additions and 4 deletions

View File

@ -104,8 +104,12 @@ Class | Method | HTTP request | Description
- **API key parameter name**: {{keyParamName}} - **API key parameter name**: {{keyParamName}}
- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}} - **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
{{/isApiKey}} {{/isApiKey}}
{{#isBasic}}- **Type**: HTTP basic authentication {{#isBasicBasic}}- **Type**: HTTP basic authentication
{{/isBasic}} {{/isBasicBasic}}
{{#isBasicBearer}}- **Type**: HTTP Bearer Token authentication{{#bearerFormat}} ({{{.}}}){{/bearerFormat}}
{{/isBasicBearer}}
{{#isHttpSignature}}- **Type**: HTTP signature authentication
{{/isHttpSignature}}
{{#isOAuth}} {{#isOAuth}}
- **Type**: OAuth - **Type**: OAuth

View File

@ -196,9 +196,9 @@ public class ApiInvoker {
{{#isApiKey}} {{#isApiKey}}
INSTANCE.authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}")); INSTANCE.authentications.put("{{name}}", new ApiKeyAuth({{#isKeyInHeader}}"header"{{/isKeyInHeader}}{{^isKeyInHeader}}"query"{{/isKeyInHeader}}, "{{keyParamName}}"));
{{/isApiKey}} {{/isApiKey}}
{{#isBasic}} {{#isBasicBasic}}
INSTANCE.authentications.put("{{name}}", new HttpBasicAuth()); INSTANCE.authentications.put("{{name}}", new HttpBasicAuth());
{{/isBasic}} {{/isBasicBasic}}
{{#isOAuth}} {{#isOAuth}}
// TODO: comment out below as OAuth does not exist // TODO: comment out below as OAuth does not exist
//INSTANCE.authentications.put("{{name}}", new OAuth()); //INSTANCE.authentications.put("{{name}}", new OAuth());