Options
All
  • Public
  • Public/Protected
  • All
Menu

Interface UserService

User service interface that defines a set of requirements (methods) for mapping particular fields from the user object returned from the repository.

see

UserRepository

Hierarchy

  • UserService

Index

Methods

getProfile

  • getProfile(user: any): any
  • Returns profile data for the user Function should be used to filter out data that should not be returned to the client. For example password hash.

    Parameters

    • user: any

    Returns any

hasResourceRole

  • hasResourceRole(user: any, role: string | undefined): boolean
  • Checks if the current user has the role required to access a resource

    Parameters

    • user: any

      User data

    • role: string | undefined

      The role required to access a resource

    Returns boolean

    • Returns true/false if the user is authorized to access a resource

validatePassword

  • validatePassword(user: any, password: string): boolean
  • Checks if the password given by the user upon login matches the password assigned to that user from the data source

    Parameters

    • user: any

      User data

    • password: string

      Plain text password given by the user upon login

    Returns boolean

    • Returns true/false if the password is valid

Generated using TypeDoc