Function checkRequestAuthentication

  • Checks that a request passes authentication with the given authenticate function

    Parameters

    • request: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>

      Request to be checked

    • authenticate: ((req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction) => Promise<void>)

      authentication function to run. Expected to mark a response with a 401 status code if authentication failed, otherwise a next() function should be called

        • (req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>, res: Response<any, Record<string, any>>, next: NextFunction): Promise<void>
        • Parameters

          • req: Request<ParamsDictionary, any, any, ParsedQs, Record<string, any>>
          • res: Response<any, Record<string, any>>
          • next: NextFunction

          Returns Promise<void>

    Returns Promise<void>

Generated using TypeDoc