HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux ip-172-31-42-149 5.15.0-1084-aws #91~20.04.1-Ubuntu SMP Fri May 2 07:00:04 UTC 2025 aarch64
User: ubuntu (1000)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: //proc/self/root/usr/local/lib/node_modules/@ionic/cli/lib/oauth/oauth.d.ts
/// <reference types="node" />
import { Response } from 'superagent';
import { ContentType, IClient, IConfig, OAuthServerConfig, OpenIdToken } from '../../definitions';
export interface AuthorizationParameters {
    [key: string]: string;
}
export interface TokenParameters {
    [key: string]: string;
}
export interface OAuth2FlowOptions {
    readonly redirectHost?: string;
    readonly redirectPort?: number;
    readonly accessTokenRequestContentType?: ContentType;
}
export interface OAuth2FlowDeps {
    readonly client: IClient;
    readonly config: IConfig;
}
export declare abstract class OAuth2Flow<T extends OpenIdToken> {
    readonly e: OAuth2FlowDeps;
    abstract readonly flowName: string;
    readonly oauthConfig: OAuthServerConfig;
    readonly redirectHost: string;
    readonly redirectPort: number;
    readonly accessTokenRequestContentType: ContentType;
    constructor({ redirectHost, redirectPort, accessTokenRequestContentType }: OAuth2FlowOptions, e: OAuth2FlowDeps);
    get redirectUrl(): string;
    run(): Promise<T>;
    exchangeRefreshToken(refreshToken: string): Promise<T>;
    protected abstract generateAuthorizationParameters(challenge: string): AuthorizationParameters;
    protected abstract generateTokenParameters(authorizationCode: string, verifier: string): TokenParameters;
    protected abstract generateRefreshTokenParameters(refreshToken: string): TokenParameters;
    protected abstract checkValidExchangeTokenRes(res: Response): boolean;
    protected abstract getAuthConfig(): OAuthServerConfig;
    protected getSuccessHtml(): Promise<string>;
    protected getAuthorizationCode(): Promise<{
        code: string;
        state?: string;
    }>;
    protected exchangeAuthForAccessToken(authorizationCode: string, verifier: string): Promise<T>;
    protected generateVerifier(): string;
    protected generateChallenge(verifier: string): string;
    protected base64URLEncode(buffer: Buffer): string;
}