API Reference
Rockets Core API
nestjs-user
classes
UserPasswordService

Class: UserPasswordService

User password service

Implements

Constructors

new UserPasswordService()

new UserPasswordService(userLookupService, passwordCreationService, userPasswordHistoryService?): UserPasswordService

Constructor

Parameters

ParameterTypeDescription
userLookupServiceUserLookupServiceInterfaceuser lookup service
passwordCreationServicePasswordCreationServiceInterfacepassword creation service
userPasswordHistoryService?UserPasswordHistoryServiceInterface-

Returns

UserPasswordService

Defined in

.tmp/repos/rockets/packages/nestjs-user/src/services/user-password.service.ts:34 (opens in a new tab)

Properties

PropertyModifierTypeDescription
passwordCreationServicereadonlyPasswordCreationServiceInterfacepassword creation service
userLookupServicereadonlyUserLookupServiceInterfaceuser lookup service

Methods

getPasswordStore()

getPasswordStore(userId): Promise<ReferenceIdInterface<string> & PasswordStorageInterface>

Get the object containing the password store by user id.

Object must have reference id and password storage interface.

Parameters

ParameterTypeDescription
userIdstringThe id of the user that is being updated

Returns

Promise<ReferenceIdInterface<string> & PasswordStorageInterface>

The user being updated

Implementation of

UserPasswordServiceInterface.getPasswordStore

Defined in

.tmp/repos/rockets/packages/nestjs-user/src/services/user-password.service.ts:106 (opens in a new tab)


setPassword()

setPassword(passwordDto, userToUpdateId?, authorizedUser?): Promise<Omit<Partial<PasswordPlainInterface>, "password"> | Omit<Partial<PasswordPlainInterface>, "password"> & Partial<PasswordStorageInterface>>

Set the password (hash) on the user object.

Parameters

ParameterTypeDescription
passwordDtoPartial<PasswordPlainInterface & PasswordPlainCurrentInterface>The object containing the password, and optionally the current password.
userToUpdateId?stringThe id of the user being updated.
authorizedUser?AuthenticatedUserInterfaceThe authorized user

Returns

Promise<Omit<Partial<PasswordPlainInterface>, "password"> | Omit<Partial<PasswordPlainInterface>, "password"> & Partial<PasswordStorageInterface>>

Implementation of

UserPasswordServiceInterface.setPassword

Defined in

.tmp/repos/rockets/packages/nestjs-user/src/services/user-password.service.ts:44 (opens in a new tab)


validateCurrent()

protected validateCurrent(target, password?, authorizedUser?): Promise<boolean>

Parameters

ParameterType
targetReferenceIdInterface<string> & PasswordStorageInterface
password?string
authorizedUser?AuthenticatedUserInterface

Returns

Promise<boolean>

Defined in

.tmp/repos/rockets/packages/nestjs-user/src/services/user-password.service.ts:140 (opens in a new tab)


validateHistory()

protected validateHistory(user, password?): Promise<boolean>

Parameters

ParameterType
userReferenceIdInterface<string>
password?string

Returns

Promise<boolean>

Defined in

.tmp/repos/rockets/packages/nestjs-user/src/services/user-password.service.ts:166 (opens in a new tab)