import type { OpsServer } from '../classes.opsserver.js';
import * as interfaces from '../../../dist_ts_interfaces/index.js';
export interface IAuthRequest {
    identity?: interfaces.data.IIdentity;
    apiToken?: string;
}
export interface IAuthRequirement {
    scope?: interfaces.data.TApiTokenScope;
    requireAdminIdentity?: boolean;
    requireAdminToken?: boolean;
}
export interface IAuthContext {
    type: 'identity' | 'apiToken';
    userId: string;
    role?: string;
    isAdmin: boolean;
    scopes: interfaces.data.TApiTokenScope[];
    identity?: interfaces.data.IIdentity;
    token?: interfaces.data.IStoredApiToken;
}
export declare function requireOpsAuth(opsServerRefArg: OpsServer, requestArg: IAuthRequest, requirementArg?: IAuthRequirement): Promise<IAuthContext>;
