Skip to main content

basicAuth

Callable

  • basicAuth(req: IncomingMessage, res: ServerResponse, callback: (username?: string, password?: string) => void): void

  • sets and parses basic auth headers if they exist


    Parameters

    • req: IncomingMessage

      http request object

    • res: ServerResponse

      http response

    • callback: (username?: string, password?: string) => void

      function(username, password)

    Returns void