import { InvocationResult, Provider, ValueOrPromise } from '@loopback/core'; import { Middleware, MiddlewareContext } from '@loopback/rest'; import { IAuthUserWithPermissions } from '../components/bearer-verifier'; import { CoreConfig, TenantIdEncryptionFn } from '../types'; export declare class TenantContextMiddlewareInterceptorProvider implements Provider { protected currentUser: IAuthUserWithPermissions; private readonly coreConfig; private readonly tenantIdEncryptionProvider; constructor(currentUser: IAuthUserWithPermissions, coreConfig: CoreConfig, tenantIdEncryptionProvider: TenantIdEncryptionFn); value(): (context: MiddlewareContext, next: () => any) => Promise; /** * The intercept function checks for a request context, encrypts the tenant ID, and adds it to the * request headers if the current user has a tenant ID and a secret key is available. */ intercept(context: MiddlewareContext, next: () => ValueOrPromise): Promise; private isRequestContext; }