@delewis13/appauth
Version:
A general purpose OAuth client. Vendored awaiting PR merge
27 lines (26 loc) • 1.45 kB
TypeScript
/// <reference types="node" />
import { EventEmitter } from 'events';
import * as Http from 'http';
import { AuthorizationRequest } from '../authorization_request';
import { AuthorizationRequestHandler, AuthorizationRequestResponse } from '../authorization_request_handler';
import { AuthorizationServiceConfiguration } from '../authorization_service_configuration';
import { Crypto } from '../crypto_utils';
import { QueryStringUtils } from '../query_string_utils';
export declare class ServerEventsEmitter extends EventEmitter {
static ON_UNABLE_TO_START: string;
static ON_AUTHORIZATION_RESPONSE: string;
static START_SERVER_SHUTDOWN: string;
static SERVER_SHUTDOWN_COMPLETE: string;
static SERVER_ERROR_DURING_SHUTDOWN: string;
}
export declare class NodeBasedHandler extends AuthorizationRequestHandler {
httpServerPort: number;
openCallback: null | ((url: string) => void);
authorizationPromise: Promise<AuthorizationRequestResponse | null> | null;
emitter: ServerEventsEmitter;
server: Http.Server | undefined;
constructor(httpServerPort?: number, openCallback?: null | ((url: string) => void), utils?: QueryStringUtils, crypto?: Crypto);
performAuthorizationRequest(configuration: AuthorizationServiceConfiguration, request: AuthorizationRequest): void;
closeServer(callback?: () => void): void;
protected completeAuthorizationRequest(): Promise<AuthorizationRequestResponse | null>;
}