ToolJet/plugins/packages/common/lib/index.ts
Muhsin Shah C P 80ee7b7cac
[Improvement] Auth flow improvements for RestAPI, OpenAPI & GraphQL (#5324)
* Added access token url headers option to open api

* removing and adding code

* add authentication in GraphQL as RestAPI (#6687)

* add authentication in GraphQL as RestAPI

* fix: remove double header check

---------

Co-authored-by: Jean-Baptiste PIN <jeanbaptiste@idruide.com>

* refactor auth flows for restapi, openapi & graphql

* fix type errors

* remove redundant declarations

* fix openapi build error

* update authUrl for OAuth

* fix oauth check

---------

Co-authored-by: Akshay Sasidharan <akshaysasidharan93@gmail.com>
Co-authored-by: Jean-Baptiste PIN <jibet.pin@gmail.com>
Co-authored-by: Jean-Baptiste PIN <jeanbaptiste@idruide.com>
2023-07-21 15:38:56 +05:30

48 lines
1.1 KiB
TypeScript

import { QueryError, OAuthUnauthorizedClientError } from './query.error';
import { QueryResult } from './query_result.type';
import { User } from './user.type';
import { App } from './app.type';
import { QueryService } from './query_service.interface';
import {
isEmpty,
cacheConnection,
getCachedConnection,
parseJson,
cleanSensitiveData,
getCurrentToken,
sanitizeHeaders,
sanitizeSearchParams,
fetchHttpsCertsForCustomCA,
} from './utils.helper';
import { ConnectionTestResult } from './connection_test_result.type';
import {
getRefreshedToken,
getAuthUrl,
sanitizeCustomParams,
checkIfContentTypeIsURLenc,
validateAndSetRequestOptionsBasedOnAuthType,
} from './oauth';
export {
QueryError,
OAuthUnauthorizedClientError,
QueryResult,
QueryService,
User,
App,
cacheConnection,
getCachedConnection,
parseJson,
isEmpty,
ConnectionTestResult,
cleanSensitiveData,
getCurrentToken,
getRefreshedToken,
getAuthUrl,
sanitizeCustomParams,
sanitizeHeaders,
sanitizeSearchParams,
checkIfContentTypeIsURLenc,
validateAndSetRequestOptionsBasedOnAuthType,
fetchHttpsCertsForCustomCA,
};