import { AccessToken } from '../model/access-token'; import { UserState } from '../model/user-state'; import { AuthManager } from './auth-manager'; /** * PKCEAuthManagerSettings. */ export declare class PKCEAuthManagerSettings { /** * PKCEAuthManagerSettings constructor. * @param authHost Authorize Host. * @param clientId Client Id. * @param redirectUri Redirect URI. * @param tenant Tenant. * @param region Region. */ constructor(authHost: string, clientId: string, redirectUri: string, tenant: string, region: string, redirectParamsStorageName?: string, enableTenantScopedTokens?: boolean, enableMultiRegionSupport?: boolean); /** * Client Id. */ clientId: string; /** * Redirect URI. */ redirectUri: string; /** * Authorization Host. */ authHost: string; /** * Redirect params storage name. */ redirectParamsStorageName: string; /** * Tenant. */ tenant: string; /** * Region. */ region: string; /** * Return tenant scoped access tokens if set to true */ enableTenantScopedTokens: boolean; /** * Update auth host url to be tenant based if set to true */ enableMultiRegionSupport: boolean; } /** * PKCEOAuthRedirectParams. */ export interface PKCEOAuthRedirectParams { state: string; codeVerifier: string; codeChallenge: string; } /** * PKCEAuthManager. */ export declare class PKCEAuthManager implements AuthManager { /** * PKCEAuthManager constructor. * @param settings PKCEAuthManagerSettings. */ constructor(settings: PKCEAuthManagerSettings); private _settings; private _redirectParamsStorage; private _userParamsStorage; private _authProxy; /** * Gets redirect path from storage. */ getRedirectPath(): string; /** * Sets redirect path in storage. * @param redirectPath Redirect path. */ setRedirectPath(redirectPath: string): void; /** * Deletes redirect path in storage. */ deleteRedirectPath(): void; /** * Gets user state params from storage. */ getUserStateParameter(): UserState; /** * Gets an access token using the search parameters from a provided URL or window location * and stored OAuth parameters. An underlying token API call is made to retrieve a new token. * @param url Url. */ getAccessToken(url?: string): Promise; /** * Generates the Authorize URL. * @param additionalQueryParams Additional query parameters. */ generateAuthUrl(additionalQueryParams?: Map): URL; /** * Generates the Logout URL and clear user params saved in session storage. * @param redirectUrl Optional redirect URL. */ generateLogoutUrl(redirectUrl: string): URL; /** * Generates the TOS URL. */ generateTosUrl(): URL; private getSearchParameters; private getRedirectOAuthParameters; private deleteRedirectOAuthParameters; private deleteStoredUserStateParameters; private decodeAndStoreUserStateParameters; }