/// import * as Bunyan from 'bunyan'; import { CallHandler, ExecutionContext, NestInterceptor } from '@nestjs/common'; import { ServerResponse } from 'http'; import { Observable } from 'rxjs'; import { Request as ExpressRequest } from 'express'; import { IdentityBill, IdentifiedBillBase } from './types'; import { StringTo } from './helper-types'; import { HttpAuthnOptions } from './authn/options'; import { HttpAuthzOptions } from './authz/options'; export interface HttpAuthxOptions { logger?: Bunyan; authn: HttpAuthnOptions; authz: HttpAuthzOptions; forbiddenResponse?: (request: ExpressRequest, response: ServerResponse, scopes: ReadonlyArray) => StringTo; unauthorizedResponse?: (request: ExpressRequest, response: ServerResponse) => StringTo; } export declare class HttpAuthxInterceptor implements NestInterceptor { private readonly options; private readonly logger; private readonly tree; constructor(options: HttpAuthxOptions); private _unauthorized; private _doAuthn; private _buildIdentity; private _shortCircuitBadAuth; private _forbidden; private _getScopes; private _validateScopesAgainstGrants; private _validateScopeAgainstRights; private _validateScopesAgainstRights; intercept(context: ExecutionContext, next: CallHandler): Promise>; }