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:
William Cheng
2019-01-31 15:27:24 +08:00
committed by GitHub
parent cbda3fad98
commit 6801741592
53 changed files with 2797 additions and 81 deletions

View File

@@ -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) {