fromACL
This module exports a function to authenticate a user based on a provided email and password.
- Source
Methods
(async, inner) failedLogin(request) → {Promise.<Error>}
Handles a failed login attempt and increases the failed attempts on the ACL.
Name | Type | Description | |||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request | Object | The request object. Properties
|
- Source
A Promise that resolves with an Error indicating that authentication failed.
- Type:
- Promise.<Error>
(async, inner) fromACL(req) → {Promise.<(Object|Error)>}
Authenticates a user based on the provided email and password.
Name | Type | Description | ||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
req | Object | The request object. Properties
|
- Source
A Promise that resolves with the user object or an Error if authentication fails.
- Type:
- Promise.<(Object|Error)>
(async, inner) getUser(request) → {Promise.<(Object|Error)>}
Retrieves the user from the ACL and updates the access_log property.
Name | Type | Description | ||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
request | Object | The request object. Properties
|
- Source
A Promise that resolves with the user object or an Error if the user is not found or authentication fails.
- Type:
- Promise.<(Object|Error)>
(async, inner) userExpiry(user, request) → {Promise.<boolean>}
Checks if the user account has expired.
Name | Type | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
user | Object | The user object. | |||||||||
request | Object | The request object. Properties
|
- Source
A Promise that resolves with a boolean indicating if the user account has expired.
- Type:
- Promise.<boolean>