Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "lib/request-handlers/users"

Index

Functions

Object literals

Functions

Const login

  • login(request: Request<ParamsDictionary, any, any, ParsedQs>, response: Response<any>): Promise<void>
  • handles user login and returns token if user and password match

    Parameters

    • request: Request<ParamsDictionary, any, any, ParsedQs>
    • response: Response<any>

    Returns Promise<void>

Const profile

  • profile(request: Request<ParamsDictionary, any, any, ParsedQs>, response: Response<any>): Promise<void>
  • Returns some basic information about a user

    Parameters

    • request: Request<ParamsDictionary, any, any, ParsedQs>
    • response: Response<any>

    Returns Promise<void>

Const signup

  • signup(request: Request<ParamsDictionary, any, any, ParsedQs>, response: Response<any>): Promise<void>
  • This is for signing up users. It actually is disabled in production. Users can only created by developers for now re DATAHUB-82 TODO: [DATAHUB-89] Find a better schema for backend user authentication. This is actually a frontend method that we are using. The JWTs should not live forever

    Parameters

    • request: Request<ParamsDictionary, any, any, ParsedQs>
    • response: Response<any>

    Returns Promise<void>

Object literals

Const tokenSignOpts

tokenSignOpts: object

algorithm

algorithm: "HS256" = "HS256"

Generated using TypeDoc