import type { FormApi, FormState } from 'informed'; import type { ChangeEvent, Context } from 'react'; import { Component } from 'react'; import type { InputActionButtonProps } from '../common/TextField'; import type { SecurityDetails } from '../../types'; import type { RedocProNormalizedOptions } from '../../services'; export interface OAuth2FlowProps { authorizationUrl: string; tokenUrl?: string; usePkce?: { disableManualConfiguration: boolean; hideClientSecretInput: boolean; }; authCorsProxyUrl: Maybe; scopes: string[]; server: string; id: string; form: FormState; formApi: FormApi; flow: 'implicit' | 'authorizationCode'; tokenEndpointAuthMethod?: string | string[]; clientId?: string; defaultValues?: SecurityDetails; } interface OAuth2FlowState { error: string | null; loading: boolean; showPkceOptions: boolean; codeVerifier?: string; codeChallenge?: string; validCodeChallenge?: string; } export declare class OAuth2Flow extends Component { static contextType: Context; context: RedocProNormalizedOptions; state: OAuth2FlowState; get values(): { client_id: string; client_secret: string; scopes: string[]; token: { access_token: string; token_type: string; }; }; get errors(): GenericObject; get pkceInputActionButtonProps(): InputActionButtonProps | undefined; componentDidMount(): void; handleAuthorize(_authorizationUrl: string): void; handleLogout(): void; handleCancel(): void; clearToken: () => void; togglePkceOptions: () => void; handleCodeVerifierChange: ({ target: { value: codeVerifier }, }: ChangeEvent) => Promise; render(): JSX.Element; } export {};