Skip to main content

Class: abstract AbstractTenantResolutionService<PAYLOAD>

auth/src.AbstractTenantResolutionService

Extended By​

Type parameters​

▪ PAYLOAD extends IAccessTokenPayload

Constructors​

new AbstractTenantResolutionService()​

new AbstractTenantResolutionService<PAYLOAD>(): AbstractTenantResolutionService<PAYLOAD>

Returns​

AbstractTenantResolutionService<PAYLOAD>

Methods​

abstract resolveTenantId​

abstract resolveTenantId(req, jwtPayload?): Promise<string>

jwt payload is optional because it can be undefined in cases where the auth is not needed

Parameters​

▪ req: FastifyRequest<RouteGenericInterface, RawServerDefault, IncomingMessage, FastifySchema, FastifyTypeProviderDefault, unknown, FastifyBaseLogger, ResolveFastifyRequestType<FastifyTypeProviderDefault, FastifySchema, RouteGenericInterface>>

▪ jwtPayload?: PAYLOAD

Returns​

Promise<string>

Source​

libs/auth/src/lib/multi-tenancy/abstract-tenant-resolution.service.ts:10


abstract verifyUserBelongToTenant​

abstract verifyUserBelongToTenant(tenantId, jwtPayload): Promise<boolean>

verify user belong to tenant works only for authorized users

Parameters​

▪ tenantId: string

▪ jwtPayload: PAYLOAD

Returns​

Promise<boolean>

Source​

libs/auth/src/lib/multi-tenancy/abstract-tenant-resolution.service.ts:18


Generated using typedoc-plugin-markdown and TypeDoc