import { CodeExchangeRequest, CodeExchangeResponse, RequestAuthorize } from './types'; export declare class HostedLoginClient { private _baseURL; private _authenticator; private _authorizationHeader; private readonly redirectURI; /** * @param redirectURI - Required, URI that the user will be redirected to once it was authenticated with Frontegg. */ constructor(redirectURI: URL); /** * Generates a URL to redirect the user in order to authenticate with Frontegg. * The user should be redirected to this URL * @param state - Optional, let you provide a state that will be provided on the response from Frontegg. * @returns authorization - the url to redirect the user to in order to authenticate with Frontegg */ requestAuthorize({ state }: RequestAuthorize): Promise; /** * This method verify the code provided by the client and exchange it with user information. * @param code - Required, on time code to verify the user authentication * @param state - Optional, required only if state was provided in the authorization request * @returns user - The user profile information. * @returns accessToken - User access token to call Frontegg APIs. * @returns refreshToken - refresh token to generate new access token. */ codeExchange({ code, state }: CodeExchangeRequest): Promise; private decodeAccessToken; private getAuthorizationHeader; private getFronteggBaseURL; private getFronteggCredentials; private fetchBaseURL; private getFronteggAuthenticator; }