Skip to content

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

Class: UserTenantInterceptorInterceptor

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 UserTenantInterceptorInterceptor(userTenantRepository, currentUser)

Parameters

Name Type
userTenantRepository UserTenantRepository
currentUser IAuthUserWithPermissions<string, string, string>

Defined in

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

Properties

currentUser

Protected currentUser: IAuthUserWithPermissions<string, string, string>

Defined in

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


userTenantRepository

Protected userTenantRepository: UserTenantRepository

Defined in

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


BINDING_KEY

Static Readonly BINDING_KEY: "interceptors.UserTenantInterceptorInterceptor"

Defined in

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

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/user-tenant-interceptor.interceptor.ts:53


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/user-tenant-interceptor.interceptor.ts:44