import { RequestHandler } from "express";
import { Optional } from "typescript-optional";
import { LogLevelDesc } from "@hyperledger/cactus-common";
import { IWebServiceEndpoint } from "@hyperledger/cactus-core-api";
import { PluginRegistry } from "@hyperledger/cactus-core";
import { AuthorizationProtocol } from "../config/authorization-protocol";
import { ICactusApiServerOptions } from "../config/config-service";
import { IAuthorizationConfig } from "./i-authorization-config";
export declare const K_WARN_NO_AUTHORIZATION_PROTOCOL: string;
export interface IAuthorizationConfiguratorOptions {
    logLevel?: LogLevelDesc;
    pluginRegistry: PluginRegistry;
    apiServerOptions: ICactusApiServerOptions;
}
export declare class AuthorizerFactory {
    readonly opts: IAuthorizationConfiguratorOptions;
    static readonly CLASS_NAME = "AuthorizerFactory";
    static readonly E_BAD_EXPRESS_JWT_OPTIONS: string;
    private readonly log;
    private readonly pluginRegistry;
    private readonly plugins;
    private _unprotectedEndpoints;
    private initialized;
    get isInitialized(): boolean;
    get className(): string;
    constructor(opts: IAuthorizationConfiguratorOptions);
    private createExpressJwtMiddleware;
    /**
     * Creates an ExpressJS middleware (a request handler) that can be hooked
     * up to the Express web application with authorization as per the API
     * server configuration.
     * It is assumed by this method that the plugin registry has already been
     * initialized and now is containing the list of plugins that can be filtered
     * down to the list of plugins that also expose web services (without which
     * the authorization will not work properly)
     */
    createMiddleware(authorizationProtocol: AuthorizationProtocol, authzConf: IAuthorizationConfig): Promise<Optional<RequestHandler>>;
    initOnce(): Promise<void>;
    getEndpoints(): Promise<IWebServiceEndpoint[]>;
    get unprotectedEndpoints(): IWebServiceEndpoint[];
    private findUnprotectedEndpoints;
}
