local authentication module
This module performs authentication of users against mongodb
- Source:
Methods
(async, private, static) localAuthentication(username, password, done)
authenticate users with a username and password.
Accept a memberID as a username, and case-sensitive lastName as a
password.
When authentication is sucessful, a user object is passed to the done
function, which represents the logged in user. The object contains
all known properties.
There is an extremely rare edge cases where the behavior is undefined.
If a user has the same last name and memberID as another member in a
different council AND both of those members are in this database, only
the first match will be returned. If this ever comes to be the
case, a drop down box of councils should be added to the login screen
and the council number can be added to the search query for
disambiguation. OR even better, this login could be integrated with
the BSA SSO system.
Parameters:
Name | Type | Description |
---|---|---|
username |
String | username to compare |
password |
String | password to compare |
done |
function | the function to call upon completion |
- Source: