import type { AuthCodeOption } from "./oauth2.js";
import { AuthUser, type OAuth2Token, type Provider } from "./auth.js";
export declare class BaseProvider implements Provider {
    #private;
    Logo(): string;
    Order(): number;
    Context(): unknown;
    SetContext(ctx: unknown): void;
    PKCE(): boolean;
    SetPKCE(enable: boolean): void;
    DisplayName(): string;
    SetDisplayName(displayName: string): void;
    Scopes(): string[] | null;
    SetScopes(scopes: string[] | null): void;
    ClientId(): string;
    SetClientId(clientId: string): void;
    ClientSecret(): string;
    SetClientSecret(secret: string): void;
    RedirectURL(): string;
    SetRedirectURL(url: string): void;
    AuthURL(): string;
    SetAuthURL(url: string): void;
    TokenURL(): string;
    SetTokenURL(url: string): void;
    UserInfoURL(): string;
    SetUserInfoURL(url: string): void;
    Extra(): Record<string, unknown> | null;
    SetExtra(data: Record<string, unknown> | null): void;
    Client(_token: OAuth2Token | null): (input: Request | URL | string, init?: RequestInit) => Promise<Response>;
    BuildAuthURL(state: string, ...opts: AuthCodeOption[]): string;
    FetchToken(code: string, ...opts: AuthCodeOption[]): Promise<OAuth2Token>;
    FetchRawUserInfo(token: OAuth2Token): Promise<Uint8Array>;
    FetchAuthUser(token: OAuth2Token): Promise<AuthUser>;
    protected oauth2Config(): {
        RedirectURL: string;
        ClientID: string;
        ClientSecret: string;
        Scopes: string[];
        Endpoint: {
            AuthURL: string;
            TokenURL: string;
        };
        AuthCodeURL: (state: string, ...opts: AuthCodeOption[]) => string;
    };
    protected setDefaults(options: {
        displayName?: string;
        pkce?: boolean;
        scopes?: string[];
        authURL?: string;
        tokenURL?: string;
        userInfoURL?: string;
    }): void;
}
