1
0
mirror of https://github.com/sasjs/adapter.git synced 2026-01-07 12:30:06 +00:00

chore: fetch username for Redirected-Login and return

This commit is contained in:
Saad Jutt
2021-09-07 05:26:42 +05:00
parent 0972c0deaa
commit a1f5355d6a
4 changed files with 48 additions and 37 deletions

View File

@@ -25,7 +25,7 @@ import {
Sas9JobExecutor
} from './job-execution'
import { ErrorResponse } from './types/errors'
import { LoginOptions } from './types/LoginOptions'
import { LoginOptions, LoginReturn } from './types/Login'
const defaultConfig: SASjsConfig = {
serverUrl: '',
@@ -538,7 +538,7 @@ export default class SASjs {
username?: string,
password?: string,
options: LoginOptions = {}
) {
): Promise<LoginReturn> {
if (this.sasjsConfig.loginMechanism === LoginMechanism.Default) {
if (!username || !password) {
throw new Error(