mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-07 12:30:06 +00:00
Merge branch 'axios-fetch' of https://github.com/sasjs/adapter into axios-fetch
This commit is contained in:
@@ -674,13 +674,11 @@ export class SASViyaApiClient {
|
|||||||
* @param clientId - the client ID to authenticate with.
|
* @param clientId - the client ID to authenticate with.
|
||||||
* @param clientSecret - the client secret to authenticate with.
|
* @param clientSecret - the client secret to authenticate with.
|
||||||
* @param authCode - the auth code received from the server.
|
* @param authCode - the auth code received from the server.
|
||||||
* @param insecure - this boolean tells adapter to ignore SSL errors. [Not Recommended]
|
|
||||||
*/
|
*/
|
||||||
public async getAccessToken(
|
public async getAccessToken(
|
||||||
clientId: string,
|
clientId: string,
|
||||||
clientSecret: string,
|
clientSecret: string,
|
||||||
authCode: string,
|
authCode: string
|
||||||
insecure: boolean = false
|
|
||||||
): Promise<SasAuthResponse> {
|
): Promise<SasAuthResponse> {
|
||||||
const url = this.serverUrl + '/SASLogon/oauth/token'
|
const url = this.serverUrl + '/SASLogon/oauth/token'
|
||||||
let token
|
let token
|
||||||
|
|||||||
@@ -378,21 +378,18 @@ export default class SASjs {
|
|||||||
* @param clientId - the client ID to authenticate with.
|
* @param clientId - the client ID to authenticate with.
|
||||||
* @param clientSecret - the client secret to authenticate with.
|
* @param clientSecret - the client secret to authenticate with.
|
||||||
* @param authCode - the auth code received from the server.
|
* @param authCode - the auth code received from the server.
|
||||||
* @param insecure - this boolean tells adapter to ignore SSL errors. [Not Recommended]
|
|
||||||
*/
|
*/
|
||||||
public async getAccessToken(
|
public async getAccessToken(
|
||||||
clientId: string,
|
clientId: string,
|
||||||
clientSecret: string,
|
clientSecret: string,
|
||||||
authCode: string,
|
authCode: string
|
||||||
insecure: boolean = false
|
|
||||||
) {
|
) {
|
||||||
this.isMethodSupported('getAccessToken', ServerType.SasViya)
|
this.isMethodSupported('getAccessToken', ServerType.SasViya)
|
||||||
|
|
||||||
return await this.sasViyaApiClient!.getAccessToken(
|
return await this.sasViyaApiClient!.getAccessToken(
|
||||||
clientId,
|
clientId,
|
||||||
clientSecret,
|
clientSecret,
|
||||||
authCode,
|
authCode
|
||||||
insecure
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user