User Auth
This module handles user authentication and authorization.
- Source
Methods
(async, inner) auth(req, res) → {Promise.<(Object|Error)>}
Authenticates the user based on the provided token or authorization header.
Parameters:
Name | Type | Description | ||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
req | Object | The request object. Properties
| ||||||||||||||||||||
res | Object | The response object. |
- Source
Returns:
A Promise that resolves with the user object or an Error if authentication fails.
- Type:
- Promise.<(Object|Error)>