import { ConfigOptions } from '../config/index'; import { ResponseType } from './enums'; import { LogoutOptions, GetAuthorizationUrlOptions, GetOAuth2TokensOptions, OAuth2Tokens, EndSessionOptions } from './interfaces'; declare const allowedErrors: { AuthenticationConsentRequired: string; AuthenticationIsRequired: string; AuthorizationTimeout: string; FailedToFetch: string; NetworkError: string; CORSError: string; InteractionNotAllowed: string; LoginRequired: string; RequestRequiresConsent: string; }; /** * OAuth 2.0 client. */ declare abstract class OAuth2Client { static createAuthorizeUrl(options: GetAuthorizationUrlOptions): Promise; /** * Calls the authorize URL with an iframe. If successful, * it returns the callback URL with authentication code, * optionally using PKCE. * Method renamed in v3. * Original Name: getAuthorizeUrl * New Name: getAuthCodeByIframe */ static getAuthCodeByIframe(options: GetAuthorizationUrlOptions): Promise; /** * Exchanges an authorization code for OAuth tokens. */ static getOAuth2Tokens(options: GetOAuth2TokensOptions): Promise; /** * Gets OIDC user information. */ static getUserInfo(options?: ConfigOptions): Promise; /** * Invokes the OIDC end session endpoint. * Can result in a redirect to `/signoff` if using PingOne * It's best to explicitly provide the logout redirect URL in options * * @function endSession - call authorization server to end associated session * @param options {LogoutOptions} - an extension of ConfigOptions, but with two additional props * @param options.logoutRedirectUri {string} - the URL you want the AS to redirect to after signout * @param options.redirect {boolean} - to explicitly deactivate redirect, pass `false` */ static endSession(options?: LogoutOptions | EndSessionOptions): Promise; /** * Immediately revokes the stored access token. */ static revokeToken(options?: ConfigOptions): Promise; private static request; private static containsAuthCode; private static containsAuthError; private static getBody; private static parseError; private static getUrl; } export default OAuth2Client; export type { GetAuthorizationUrlOptions, GetOAuth2TokensOptions, OAuth2Tokens }; export { allowedErrors, ResponseType }; //# sourceMappingURL=index.d.ts.map