forked from loafle/openapi-generator-original
Add Bearer authentication support to JS client (#2020)
* add bearer authentication support to js client * add bearer format to js client * fix test case * update php ze-ph samples
This commit is contained in:
@@ -272,6 +272,12 @@ class ApiClient {
|
||||
request.auth(auth.username || '', auth.password || '');
|
||||
}
|
||||
|
||||
break;
|
||||
case 'bearer':
|
||||
if (auth.accessToken) {
|
||||
request.set({'Authorization': 'Bearer ' + auth.accessToken});
|
||||
}
|
||||
|
||||
break;
|
||||
case 'apiKey':
|
||||
if (auth.apiKey) {
|
||||
|
||||
Reference in New Issue
Block a user