mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-17 00:50:05 +00:00
fix: usernames to lower case
This commit is contained in:
@@ -23,7 +23,7 @@ export class AuthManager {
|
|||||||
* Logs into the SAS server with the supplied credentials.
|
* Logs into the SAS server with the supplied credentials.
|
||||||
* @param username - a string representing the username.
|
* @param username - a string representing the username.
|
||||||
* @param password - a string representing the password.
|
* @param password - a string representing the password.
|
||||||
* @returns - a boolean `isLoggedin`
|
* @returns - a boolean `isLoggedin` and a string `username`
|
||||||
*/
|
*/
|
||||||
public async logIn(
|
public async logIn(
|
||||||
username: string,
|
username: string,
|
||||||
@@ -161,12 +161,12 @@ export class AuthManager {
|
|||||||
|
|
||||||
return Promise.resolve({
|
return Promise.resolve({
|
||||||
isLoggedIn,
|
isLoggedIn,
|
||||||
userName,
|
userName: userName?.toLowerCase(),
|
||||||
loginForm
|
loginForm
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
private extractUserName = (response: any) =>
|
private extractUserName = (response: any): string =>
|
||||||
this.serverType === 'SASVIYA'
|
this.serverType === 'SASVIYA'
|
||||||
? response?.id
|
? response?.id
|
||||||
: response?.match(/"title":"Log Off [0-1a-zA-Z]*"/)?.[0].slice(17, -1)
|
: response?.match(/"title":"Log Off [0-1a-zA-Z]*"/)?.[0].slice(17, -1)
|
||||||
|
|||||||
Reference in New Issue
Block a user