1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-10 05:40:06 +00:00

chore: sas9 username parsing bring back

This commit is contained in:
2022-09-22 16:58:39 +02:00
parent 61fdf5573b
commit 2cbba38af5
4 changed files with 30 additions and 18 deletions

View File

@@ -217,7 +217,7 @@ export class AuthManager {
return Promise.resolve({
isLoggedIn,
userName: userName,
userName: userName.toLowerCase(),
loginForm
})
}

View File

@@ -596,6 +596,7 @@ describe('AuthManager', () => {
it('return session information when logged in - SAS9 - having full name in html', async () => {
const fullname = 'FirstName LastName'
const username = 'firlas'
const serverType = ServerType.Sas9
const authManager = new AuthManager(
serverUrl,
@@ -611,7 +612,7 @@ describe('AuthManager', () => {
const response = await authManager.checkSession()
expect(response.isLoggedIn).toBeTruthy()
expect(response.userName).toEqual(fullname)
expect(response.userName).toEqual(username)
expect(mockedAxios.get).toHaveBeenNthCalledWith(
1,
`http://test-server.com/SASStoredProcess`,