@vnodes/auth
    Preparing search index...

    Class UserManager

    Index

    Constructors

    Properties

    jwt: JwtService
    userData: User

    Accessors

    Methods

    • Compare the plain password with the hashed password

      Parameters

      • password: string

        plain password

      Returns Promise<boolean>

      boolean or throw UnauthorizedException

    • Check the user has all requiredPermissions or throw ForbiddenException

      Parameters

      • requiredPermissions: string[]

      Returns boolean

    • Check the user has one of the requiredRoles or throw ForbiddenException

      Parameters

      • requiredRoles: string[]

      Returns boolean

    • Verify jwt token

      Parameters

      • token: string

        jwt token

      Returns Promise<JwtPayload>

      string or throw UnauthorizedException that indicated invalid or old versioned token

    • Check the jwt version matches with the provided token's version or thow Invalid Jwt version error

      Parameters

      • version: string

      Returns boolean