Skip to content

@sourceloop/authentication-service / Exports / JwtPayloadProvider

Class: JwtPayloadProvider

Implements

Table of contents

Constructors

Properties

Methods

Constructors

constructor

new JwtPayloadProvider(roleRepo, utPermsRepo, userTenantRepo, tenantConfigRepo, getUserPermissions, logger)

Parameters

Name Type
roleRepo RoleRepository
utPermsRepo UserLevelPermissionRepository
userTenantRepo UserTenantRepository
tenantConfigRepo TenantConfigRepository
getUserPermissions UserPermissionsFn<string>
logger ILogger

Defined in

services/authentication-service/src/providers/jwt-payload.provider.ts:31

Properties

getUserPermissions

Private Readonly getUserPermissions: UserPermissionsFn<string>

Defined in

services/authentication-service/src/providers/jwt-payload.provider.ts:41


logger

Private Readonly logger: ILogger

Defined in

services/authentication-service/src/providers/jwt-payload.provider.ts:42


roleRepo

Private Readonly roleRepo: RoleRepository

Defined in

services/authentication-service/src/providers/jwt-payload.provider.ts:33


tenantConfigRepo

Private Readonly tenantConfigRepo: TenantConfigRepository

Defined in

services/authentication-service/src/providers/jwt-payload.provider.ts:39


userTenantRepo

Private Readonly userTenantRepo: UserTenantRepository

Defined in

services/authentication-service/src/providers/jwt-payload.provider.ts:37


utPermsRepo

Private Readonly utPermsRepo: UserLevelPermissionRepository

Defined in

services/authentication-service/src/providers/jwt-payload.provider.ts:35

Methods

_removeUnnecessaryData

Private _removeUnnecessaryData(authUser): AnyObject

Parameters

Name Type
authUser AnyObject

Returns

AnyObject

Defined in

services/authentication-service/src/providers/jwt-payload.provider.ts:111


_setLocale

Private _setLocale(authUser, userTenant): Promise<void>

Parameters

Name Type
authUser AuthUser
userTenant UserTenant

Returns

Promise<void>

Defined in

services/authentication-service/src/providers/jwt-payload.provider.ts:124


value

value(): (authUserData: IAuthUser, authClient: IAuthClient, tenantId?: string) => Promise<Object>

Returns

fn

▸ (authUserData, authClient, tenantId?): Promise<Object>

Parameters
Name Type
authUserData IAuthUser
authClient IAuthClient
tenantId? string
Returns

Promise<Object>

Implementation of

Provider.value

Defined in

services/authentication-service/src/providers/jwt-payload.provider.ts:45