UNPKG

@infosel-sdk/core

Version:

Core SDK for Infosel financial services platform. Provides essential infrastructure for authentication, HTTP/GraphQL communication, storage management, and error handling.

12 lines (11 loc) 701 B
import { AxiosInstance, AxiosResponse, InternalAxiosRequestConfig } from 'axios'; import AuthInterceptor from '../../domain/data_access/auth_interceptor'; import { GenericError } from '../../errors'; import InfoselSdkManager from '../../sdk_manager'; export default class InfoselAuthInterceptor implements AuthInterceptor<AxiosInstance, InternalAxiosRequestConfig, AxiosResponse> { private readonly sdkManager; constructor(sdkManager: InfoselSdkManager); tokenInterceptor(requestConfig: InternalAxiosRequestConfig): Promise<InternalAxiosRequestConfig>; errorInterceptor(axiosInstance: AxiosInstance, error: GenericError): Promise<AxiosResponse>; private refreshTokenInterceptor; }