fix(core): Allow ignoring SSL issues on generic oauth2 credentials (#6702)

This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™
2023-07-26 17:56:59 +02:00
committed by GitHub
parent db3c12ffc7
commit feac369f6c
8 changed files with 36 additions and 8 deletions

View File

@@ -63,14 +63,15 @@ export function auth(username: string, password: string): string {
*/
export function getRequestOptions(
{ url, method, body, query, headers }: ClientOAuth2RequestObject,
options: any,
options: ClientOAuth2Options,
): ClientOAuth2RequestObject {
const rOptions = {
url,
method,
body: { ...body, ...options.body },
query: { ...query, ...options.query },
headers: { ...headers, ...options.headers },
headers: headers ?? {},
ignoreSSLIssues: options.ignoreSSLIssues,
};
// if request authorization was overridden delete it from header
if (rOptions.headers.Authorization === '') {