mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-16 16:40:06 +00:00
fix: deriving username with full name
This commit is contained in:
@@ -176,11 +176,12 @@ export class AuthManager {
|
|||||||
switch (this.serverType) {
|
switch (this.serverType) {
|
||||||
case ServerType.SasViya:
|
case ServerType.SasViya:
|
||||||
return response?.id
|
return response?.id
|
||||||
|
|
||||||
case ServerType.Sas9:
|
case ServerType.Sas9:
|
||||||
const matched = response?.match(/"title":"Log Off [0-1a-zA-Z ]*"/)
|
const matched = response?.match(/"title":"Log Off [0-1a-zA-Z ]*"/)
|
||||||
const username = matched?.[0].slice(17, -1)
|
const username = matched?.[0].slice(17, -1)
|
||||||
|
|
||||||
if (username.length === 6) return username
|
if (!username.includes(' ')) return username
|
||||||
|
|
||||||
return username
|
return username
|
||||||
.split(' ')
|
.split(' ')
|
||||||
|
|||||||
Reference in New Issue
Block a user