Skip to content

Commit

Permalink
refs spring-io#534 - update auth for async
Browse files Browse the repository at this point in the history
  • Loading branch information
frantuma committed Dec 12, 2019
1 parent b81b5b2 commit fe22d02
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/resources/handlebars/csharp/api.mustache
Original file line number Diff line number Diff line change
Expand Up @@ -438,6 +438,13 @@ namespace {{packageName}}.{{apiPackage}}
localVarHeaderParams["Authorization"] = "Basic " + ApiClient.Base64Encode(this.Configuration.Username + ":" + this.Configuration.Password);
}
{{/isBasic}}
{{#isBearer}}
// bearer required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
{
localVarHeaderParams["Authorization"] = "Bearer " + this.Configuration.AccessToken;
}
{{/isBearer}}
{{#isOAuth}}
// oauth required
if (!String.IsNullOrEmpty(this.Configuration.AccessToken))
Expand Down

0 comments on commit fe22d02

Please sign in to comment.