import type { ResourceSet } from '../storage/ResourceSet';
import type { AuthorizerInput } from './Authorizer';
import { Authorizer } from './Authorizer';
/**
 * Authorizer that bases its decision on the output it gets from its PermissionReader.
 * For each permission it checks if the reader allows that for at least one credential type,
 * if yes, authorization is granted.
 * `undefined` values for reader results are interpreted as `false`.
 */
export declare class PermissionBasedAuthorizer extends Authorizer {
    protected readonly logger: import("..").Logger;
    private readonly resourceSet;
    /**
     * The existence of the target resource determines the output status code for certain situations.
     * The provided {@link ResourceSet} will be used for that.
     * @param resourceSet - {@link ResourceSet} that can verify the target resource existence.
     */
    constructor(resourceSet: ResourceSet);
    handle(input: AuthorizerInput): Promise<void>;
    /**
     * If we know the operation will return a 404 regardless (= resource does not exist and is not being created),
     * and the agent is allowed to know about its existence (= the agent has Read permissions),
     * then immediately send the 404 here, as it makes any other agent permissions irrelevant.
     *
     * Otherwise, deny access based on existing grounds.
     */
    private reportAccessError;
    /**
     * Ensures that at least one of the credentials provides permissions for the given mode.
     * Throws a {@link ForbiddenHttpError} or {@link UnauthorizedHttpError} depending on the credentials
     * if access is not allowed.
     * @param credentials - Credentials that require access.
     * @param permissionSet - PermissionSet describing the available permissions of the credentials.
     * @param mode - Which mode is requested.
     */
    private requireModePermission;
    /**
     * Checks whether the agent is authenticated (logged in) or not (public/anonymous).
     * @param credentials - Credentials to check.
     */
    private isAuthenticated;
}
