UNPKG

@mvx/mvc

Version:

@mvx/mvc is mvc framework on server, base on koa, @tsdi frameworks

28 lines (27 loc) 880 B
import { Type } from '@tsdi/ioc'; import { MiddlewareType } from '../middlewares/IMiddleware'; import { IContext } from '../IContext'; export declare abstract class AuthorizationService { /** * get auth middlewares of controller. * * @abstract * @param {IContext} ctx * @param {Type} controller * @returns {MiddlewareType[]} * @memberof AuthorizationService */ abstract getAuthMiddlewares(ctx: IContext, controller: Type): MiddlewareType[]; /** * get auth middlewares of controller action. * * @abstract * @param {IContext} ctx * @param {Type} controller * @param {string} propertyKey * @returns {MiddlewareType[]} * @memberof AuthorizationService */ abstract getAuthMiddlewares(ctx: IContext, controller: Type, propertyKey: string): MiddlewareType[]; static ρAnn(): any; }