File tree Expand file tree Collapse file tree 1 file changed +18
-2
lines changed
Expand file tree Collapse file tree 1 file changed +18
-2
lines changed Original file line number Diff line number Diff line change 11"use strict" ;
2+
3+ /**
4+ * Constructor for Authentication class
5+ *
6+ * @class Authentication
7+ * @param {Object[] } validUsers
8+ * @param {boolean } useEncryptedPasswords
9+ */
210function Authentication ( validUsers , useEncryptedPasswords ) {
311 this . validUsers = validUsers ;
412 this . useEncryptedPasswords = useEncryptedPasswords || false ;
513}
614
7- Authentication . prototype . authenticate = function ( userToTest ) {
15+ /**
16+ * Authenticates the `userToTest`
17+ *
18+ * @param {Object } userToTest
19+ * @returns {Object } Object with `isAuthenticated` and `appsUserHasAccessTo` properties
20+ */
21+ function authenticate ( userToTest ) {
822 let bcrypt = require ( 'bcryptjs' ) ;
923
1024 var appsUserHasAccessTo = null ;
@@ -29,6 +43,8 @@ Authentication.prototype.authenticate = function (userToTest) {
2943 isAuthenticated,
3044 appsUserHasAccessTo
3145 } ;
32- } ;
46+ }
47+
48+ Authentication . prototype . authenticate = authenticate ;
3349
3450module . exports = Authentication ;
You can’t perform that action at this time.
0 commit comments