Skip to content

Commit fe22d02

Browse files
committed
refs #534 - update auth for async
1 parent b81b5b2 commit fe22d02

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

src/main/resources/handlebars/csharp/api.mustache

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,13 @@ namespace {{packageName}}.{{apiPackage}}
438438
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
439439
}
440440
{{/isBasic}}
441+
{{#isBearer}}
442+
// bearer required
443+
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
444+
{
445+
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
446+
}
447+
{{/isBearer}}
441448
{{#isOAuth}}
442449
// oauth required
443450
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))

0 commit comments

Comments
 (0)