mirror of
https://github.com/sasjs/adapter.git
synced 2026-01-02 18:20:06 +00:00
Compare commits
10 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
dad99557a7 | ||
| c7cc2e5fa4 | |||
|
|
2bd7544051 | ||
| 1fb972d88a | |||
| 64f8f8c893 | |||
|
|
ddb4a51c55 | ||
| 921d6ef364 | |||
|
|
105675d46a | ||
|
|
e4addba762 | ||
| 8203e918fd |
12
.github/issue_template.md
vendored
Normal file
12
.github/issue_template.md
vendored
Normal file
@@ -0,0 +1,12 @@
|
||||
## Expected behaviour
|
||||
*Describe what should be happening*
|
||||
|
||||
## Current behaviour
|
||||
*Describe what is actually happening*
|
||||
|
||||
## Environment info
|
||||
**Client tech stack**: *Angular, React, Vue, VanillaJS, NodeJS etc.*
|
||||
**Server type**: SASJS|SASVIYA|SAS9
|
||||
**Login mechanism**: Default|Redirected
|
||||
**Debug**: true|false
|
||||
**Use Compute Api (relevant only on VIYA)**: true|false
|
||||
@@ -53,9 +53,7 @@ export const basicTests = (
|
||||
return await newAdapterIns.checkSession()
|
||||
},
|
||||
assertion: (response: any) =>
|
||||
adapter.getSasjsConfig().serverType === ServerType.Sas9
|
||||
? response?.isLoggedIn
|
||||
: response?.isLoggedIn && response?.userName === userName
|
||||
response?.isLoggedIn && response?.userName === userName
|
||||
},
|
||||
{
|
||||
title: 'Multiple Log in attempts',
|
||||
|
||||
@@ -895,6 +895,7 @@ export default class SASjs {
|
||||
await this.computeJobExecutor?.resendWaitingRequests()
|
||||
await this.jesJobExecutor?.resendWaitingRequests()
|
||||
await this.fileUploader?.resendWaitingRequests()
|
||||
await this.sasjsJobExecutor?.resendWaitingRequests()
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -141,7 +141,7 @@ export class AuthManager {
|
||||
await this.performCASSecurityCheck()
|
||||
}
|
||||
|
||||
await this.loginCallback()
|
||||
this.loginCallback()
|
||||
this.userName = loginParams.username
|
||||
}
|
||||
|
||||
@@ -239,7 +239,7 @@ export class AuthManager {
|
||||
}
|
||||
|
||||
const { result: formResponse } = await this.requestClient.get<string>(
|
||||
this.loginUrl.replace('.do', ''),
|
||||
this.loginUrl.replace('/SASLogon/login.do', '/SASLogon/login'),
|
||||
undefined,
|
||||
'text/plain'
|
||||
)
|
||||
@@ -348,7 +348,7 @@ export class AuthManager {
|
||||
this.loginUrl =
|
||||
this.serverType === ServerType.SasViya
|
||||
? tempLoginLink
|
||||
: loginUrl.replace('.do', '')
|
||||
: loginUrl.replace('/SASLogon/login.do', '/SASLogon/login')
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -16,8 +16,7 @@ import { SASViyaApiClient } from '../SASViyaApiClient'
|
||||
import {
|
||||
isRelativePath,
|
||||
parseSasViyaDebugResponse,
|
||||
appendExtraResponseAttributes,
|
||||
getValidJson
|
||||
appendExtraResponseAttributes
|
||||
} from '../utils'
|
||||
import { BaseJobExecutor } from './JobExecutor'
|
||||
import { parseWeboutResponse } from '../utils/parseWeboutResponse'
|
||||
@@ -184,10 +183,6 @@ export class WebJobExecutor extends BaseJobExecutor {
|
||||
}
|
||||
}
|
||||
|
||||
if (typeof jsonResponse === 'string') {
|
||||
jsonResponse = getValidJson(jsonResponse)
|
||||
}
|
||||
|
||||
const responseObject = appendExtraResponseAttributes(
|
||||
{ result: jsonResponse, log: res.log },
|
||||
extraResponseAttributes
|
||||
|
||||
@@ -4,6 +4,7 @@ import axiosCookieJarSupport from 'axios-cookiejar-support'
|
||||
import * as tough from 'tough-cookie'
|
||||
import { prefixMessage } from '@sasjs/utils/error'
|
||||
import { RequestClient, throwIfError } from './RequestClient'
|
||||
import { JobExecutionError } from '../types/errors'
|
||||
|
||||
/**
|
||||
* Specific request client for SAS9 in Node.js environments.
|
||||
@@ -69,6 +70,8 @@ export class Sas9RequestClient extends RequestClient {
|
||||
return this.parseResponse<T>(response)
|
||||
})
|
||||
.catch(async (e: any) => {
|
||||
if (e instanceof JobExecutionError) throw e
|
||||
|
||||
return await this.handleError(
|
||||
e,
|
||||
() =>
|
||||
|
||||
Reference in New Issue
Block a user