Skip to content

authorization

authorization: (options?) => Function

Defined in: http/authorization.js:50

Creates an authorization middleware that parses the Authorization header and dispatches to the matching strategy handler.

Authorization configuration

object[] = []

Authentication strategy definitions

Function

  • Async middleware (req) => info on success; on failure {response: {statusCode: 401|403, headers?}} with optional WWW-Authenticate header tuples from authenticate