import { Credentials, NotRequestKey, Strategy, Request, StrategyException } from './common.interface'; /** * This abstract class is implement general methods. */ export declare abstract class BaseAbstractStrategy implements Strategy { private readonly key; /** * oauth callback uri, oauth system will redirect this uri with code */ private readonly redirect_uri; constructor(key: NotRequestKey, /** * oauth callback uri, oauth system will redirect this uri with code */ redirect_uri: string); /** * this method will be called when strategy have exception. */ protected throw({ statusCode, message, }: StrategyException): never; getCode(request: Request): string; isRedirectURL(path: string): boolean; saveIdentity(request: Request, identity: R): void; abstract readonly OAUTH2_URI: string; abstract authorize(code: string): Promise; abstract getIdentity(credentials: C): Promise; abstract validate(identity: T, credentials: C): boolean; abstract transform(identity: T): R; }