Перейти до основного вмісту

Class: JwtPayloadTenantResolutionService

auth/src.JwtPayloadTenantResolutionService

Extends​

Constructors​

new JwtPayloadTenantResolutionService()​

new JwtPayloadTenantResolutionService(): JwtPayloadTenantResolutionService

Returns​

JwtPayloadTenantResolutionService

Inherited from​

AbstractTenantResolutionService.constructor

Methods​

resolveTenantId​

resolveTenantId(_, jwtPayload?): Promise<string>

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

Parameters​

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

▪ jwtPayload?: IAccessTokenSingleTenantPayload

Returns​

Promise<string>

Overrides​

AbstractTenantResolutionService.resolveTenantId

Source​

libs/auth/src/lib/multi-tenancy/jwt-payload-tenant-resolution.service.ts:14


verifyUserBelongToTenant​

verifyUserBelongToTenant(): Promise<boolean>

if tenant id is coming from payload it is verified

Returns​

Promise<boolean>

Overrides​

AbstractTenantResolutionService.verifyUserBelongToTenant

Source​

libs/auth/src/lib/multi-tenancy/jwt-payload-tenant-resolution.service.ts:38


Generated using typedoc-plugin-markdown and TypeDoc