import { IdType, TInjectionGetter } from '../../../common'; import { Context, Getter } from '@loopback/core'; import { ExpressServerConfig, RequestContext } from '@loopback/rest'; import { OAuth2Service } from '../services'; import { AbstractExpressRequestHandler } from '../../../base/controllers'; import { IAuthenticateOAuth2RestOptions, OAuth2AuthorizationCodeRequest, OAuth2PathRequest } from '../common'; import { OAuth2Client } from '../models'; import { OAuth2ClientRepository } from '../repositories'; interface IOAuth2ControllerOptions { config?: ExpressServerConfig | undefined; context?: Context; injectionGetter: TInjectionGetter; authServiceKey: string; viewFolder?: string; useImplicitGrant?: boolean; } export declare class DefaultOAuth2ExpressServer extends AbstractExpressRequestHandler { private static instance; private authServiceKey; private viewFolder?; private useImplicitGrant?; constructor(opts: IOAuth2ControllerOptions); static getInstance(opts: IOAuth2ControllerOptions): DefaultOAuth2ExpressServer; binding(): void; } export declare const defineOAuth2Controller: (opts?: IAuthenticateOAuth2RestOptions) => { new (authService: OAuth2Service, getCurrentUser: Getter<{ userId: IdType; }>, httpContext: RequestContext): { service: OAuth2Service; getCurrentUser: Getter<{ userId: IdType; }>; httpContext: RequestContext; whoami(): Promise<{ userId: IdType; }>; generateToken(payload: OAuth2AuthorizationCodeRequest): Promise; authorize(): Promise; getOAuth2RequestPath(payload: OAuth2PathRequest): Promise<{ requestPath: string; }>; logger: import("../../../helpers").ApplicationLogger; defaultLimit: number; }; }; declare const _OAuth2ClientController: { new (repository: import("../../..").DefaultCrudRepository): { repository: import("../../..").DefaultCrudRepository; defaultLimit: number; find(filter?: import("@loopback/repository").Filter): Promise; findById(id: IdType, filter?: import("@loopback/repository").FilterExcludingWhere): Promise; findOne(filter?: import("@loopback/repository").Filter): Promise; count(where?: import("@loopback/repository").Where): Promise; }; } | { new (repository: import("../../..").DefaultCrudRepository, getCurrentUser?: Getter): { getCurrentUser?: Getter; _getContextUser(): Promise<{ userId: IdType; roles: { id: IdType; identifier: string; priority: number; }[]; }>; create(data: Omit): Promise; updateAll(data: Partial, where?: import("@loopback/repository").Where): Promise; updateById(id: IdType, data: Partial): Promise; replaceById(id: IdType, data: OAuth2Client): Promise; deleteById(id: IdType): Promise<{ id: IdType; }>; repository: import("../../..").DefaultCrudRepository; defaultLimit: number; find(filter?: import("@loopback/repository").Filter): Promise; findById(id: IdType, filter?: import("@loopback/repository").FilterExcludingWhere): Promise; findOne(filter?: import("@loopback/repository").Filter): Promise; count(where?: import("@loopback/repository").Where): Promise; }; }; export declare class OAuth2ClientController extends _OAuth2ClientController { protected repository: OAuth2ClientRepository; constructor(repository: OAuth2ClientRepository); } export {}; //# sourceMappingURL=oauth2.controller.d.ts.map