Options
All
  • Public
  • Public/Protected
  • All
Menu

Class UserInteractor

Interactor for User entity

Hierarchy

  • UserInteractor

Implements

Index

Constructors

Properties

Methods

Constructors

constructor

  • Parameters

    Returns UserInteractor

Properties

_entity

_entity: User

Methods

hashPassword

  • Hashes user password

    Parameters

    Returns User

    New User object with hashed password

matchPassword

  • matchPassword(password: string, hashFn: HashFunction): boolean
  • Matches stored password against provided

    Parameters

    • password: string

      Tested password

    • hashFn: HashFunction

      Hash function

    Returns boolean

    Whether passwords match

stripUser

  • Strips User from any sensitive information such as password hash

    Returns User

    New stripped User object

update

  • Update User

    Parameters

    • fieldsToUpdate: Partial<Omit<User, "id">>

      Field to be updated

    Returns User

    New updated User object

Generated using TypeDoc