Authentication middleware. Will authenticate requests using @ambassify/authentication package. See its documentation for more information about options, defaults and the credentials.

Options

Option Type Default Description
bubobox boolean false Enable or disable BuboBox authentication
persona boolean false Enable or disable Persona authentication
internal boolean false Enable or disable Guardian Internal authentication
external boolean false Enable or disable Guardian External authentication
onCredentials function A function that sets the credentials to req.context.credentials if you’re using the context middleware or res.locals.credentials otherwise. Specify a callback function that handles the credentials generated by successful authentication. It receives two parameters: the credentials object and a { req, res } object.
…rest object {} All other options are passed through to the create...Authenticator functions of @ambassify/authentication