Skip to content

Commit

Permalink
Renamed basic authentication function in sttp client (#8396)
Browse files Browse the repository at this point in the history
* Fix #8395 - changed function name to basic

* Fix #8395 - changed function name to basic

* Fix #8395 - removed test.yaml file

Co-authored-by: sergey <[email protected]>
  • Loading branch information
aneksamun and sergey committed Jan 12, 2021
1 parent 1c85fdc commit a80788d
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ class {{classname}}(baseUrl: String) {
.method(Method.{{httpMethod.toUpperCase}}, uri"$baseUrl{{{path}}}{{#queryParams.0}}?{{#queryParams}}{{baseName}}=${ {{{paramName}}} }{{^-last}}&{{/-last}}{{/queryParams}}{{/queryParams.0}}{{#isApiKey}}{{#isKeyInQuery}}{{^queryParams.0}}?{{/queryParams.0}}{{#queryParams.0}}&{{/queryParams.0}}{{keyParamName}}=${apiKey.value}&{{/isKeyInQuery}}{{/isApiKey}}")
.contentType({{#consumes.0}}"{{{mediaType}}}"{{/consumes.0}}{{^consumes}}"application/json"{{/consumes}}){{#headerParams}}
.header({{>paramCreation}}){{/headerParams}}{{#authMethods}}{{#isBasic}}{{#isBasicBasic}}
.auth.withCredentials(username, password){{/isBasicBasic}}{{#isBasicBearer}}
.auth.basic(username, password){{/isBasicBasic}}{{#isBasicBearer}}
.auth.bearer(bearerToken){{/isBasicBearer}}{{/isBasic}}{{#isApiKey}}{{#isKeyInHeader}}
.header("{{keyParamName}}", apiKey){{/isKeyInHeader}}{{#isKeyInCookie}}
.cookie("{{keyParamName}}", apiKey){{/isKeyInCookie}}{{/isApiKey}}{{/authMethods}}{{#formParams.0}}{{^isMultipart}}
Expand Down

0 comments on commit a80788d

Please sign in to comment.