forked from loafle/openapi-generator-original
parent
8ff230ed06
commit
580da9978a
@ -142,6 +142,13 @@ export class {{classname}} {
|
|||||||
}
|
}
|
||||||
|
|
||||||
{{/isBasicBasic}}
|
{{/isBasicBasic}}
|
||||||
|
{{#isBasicBearer}}
|
||||||
|
if (typeof this.configuration.accessToken === 'function') {
|
||||||
|
headers['Authorization'] = `Bearer ${this.configuration.accessToken()}`;
|
||||||
|
} else if (this.configuration.accessToken) {
|
||||||
|
headers['Authorization'] = `Bearer ${this.configuration.accessToken}`;
|
||||||
|
}
|
||||||
|
{{/isBasicBearer}}
|
||||||
{{#isOAuth}}
|
{{#isOAuth}}
|
||||||
if (this.configuration.accessToken) {
|
if (this.configuration.accessToken) {
|
||||||
const accessToken = typeof this.configuration.accessToken === 'function'
|
const accessToken = typeof this.configuration.accessToken === 'function'
|
||||||
|
Loading…
x
Reference in New Issue
Block a user