mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-09 13:30:04 +00:00
Merge pull request #729 from sasjs/update-AuthManager
fix: update logout url
This commit is contained in:
@@ -23,7 +23,7 @@ export class AuthManager {
|
|||||||
? '/SASLogon/logout?'
|
? '/SASLogon/logout?'
|
||||||
: this.serverType === ServerType.SasViya
|
: this.serverType === ServerType.SasViya
|
||||||
? '/SASLogon/logout.do?'
|
? '/SASLogon/logout.do?'
|
||||||
: '/SASjsApi/auth/logout'
|
: '/SASLogon/logout'
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -334,19 +334,9 @@ export class AuthManager {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Logs out of the configured SAS server.
|
* Logs out of the configured SAS server.
|
||||||
* @param accessToken - an optional access token is required for SASjs server type.
|
*
|
||||||
*/
|
*/
|
||||||
public async logOut() {
|
public async logOut() {
|
||||||
if (this.serverType === ServerType.Sasjs) {
|
|
||||||
return this.requestClient
|
|
||||||
.delete(this.logoutUrl)
|
|
||||||
.catch(() => true)
|
|
||||||
.finally(() => {
|
|
||||||
this.requestClient.clearLocalStorageTokens()
|
|
||||||
return true
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
this.requestClient.clearCsrfTokens()
|
this.requestClient.clearCsrfTokens()
|
||||||
|
|
||||||
return this.requestClient.get(this.logoutUrl, undefined).then(() => true)
|
return this.requestClient.get(this.logoutUrl, undefined).then(() => true)
|
||||||
|
|||||||
Reference in New Issue
Block a user