Skip to content

@sourceloop/user-tenant-service / Exports / TenantInterceptorInterceptor

Class: TenantInterceptorInterceptor

This class will be bound to the application as an Interceptor during boot

Implements

  • Provider<Interceptor>

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new TenantInterceptorInterceptor(currentUser)

Parameters

Name Type
currentUser IAuthUserWithPermissions<string, string, string>

Defined in

services/user-tenant-service/src/interceptors/tenant-interceptor.interceptor.ts:29

Properties

currentUser

Protected currentUser: IAuthUserWithPermissions<string, string, string>

Defined in

services/user-tenant-service/src/interceptors/tenant-interceptor.interceptor.ts:31


BINDING_KEY

Static Readonly BINDING_KEY: "interceptors.TenantInterceptorInterceptor"

Defined in

services/user-tenant-service/src/interceptors/tenant-interceptor.interceptor.ts:26

Methods

intercept

intercept(invocationCtx, next): Promise<any>

The logic to intercept an invocation

Parameters

Name Type Description
invocationCtx InvocationContext Invocation context
next () => any A function to invoke next interceptor or the target method

Returns

Promise<any>

Defined in

services/user-tenant-service/src/interceptors/tenant-interceptor.interceptor.ts:49


value

value(): (invocationCtx: InvocationContext, next: () => any) => Promise<any>

This method is used by LoopBack context to produce an interceptor function for the binding.

Returns

fn

An interceptor function

▸ (invocationCtx, next): Promise<any>

The logic to intercept an invocation

Parameters
Name Type Description
invocationCtx InvocationContext Invocation context
next () => any A function to invoke next interceptor or the target method
Returns

Promise<any>

Implementation of

Provider.value

Defined in

services/user-tenant-service/src/interceptors/tenant-interceptor.interceptor.ts:40