Skip to content

Commit f4c7325

Browse files
author
Andreas Kind
committed
fixes #9495, fixes #9879
1 parent a408204 commit f4c7325

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

modules/swagger-codegen/src/main/resources/php/api.mustache

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -472,6 +472,12 @@ use {{invokerPackage}}\ObjectSerializer;
472472
$headers['Authorization'] = 'Basic ' . base64_encode($this->config->getUsername() . ":" . $this->config->getPassword());
473473
}
474474
{{/isBasic}}
475+
{{#isBearer}}
476+
// this endpoint requires Bearer token
477+
if ($this->config->getAccessToken() !== null) {
478+
$headers['Authorization'] = 'Bearer ' . $this->config->getAccessToken();
479+
}
480+
{{/isBearer}}
475481
{{#isOAuth}}
476482
// this endpoint requires OAuth (access token)
477483
if ($this->config->getAccessToken() !== null) {

0 commit comments

Comments
 (0)