mirror of
https://github.com/hanzoai/passport-local.git
synced 2026-09-23 23:48:22 +00:00
Improve jsdoc.
This commit is contained in:
+12
-16
@@ -129,19 +129,17 @@ module.exports = Strategy;
|
||||
* Verifies `username` and `password` and yields authenticated user.
|
||||
*
|
||||
* This function is called by `{@link Strategy}` to verify a username and
|
||||
* password, and must invoke `cb` to yield the result. `cb` is an error-first
|
||||
* callback with the following signature: `cb(err, user, [info])` where:
|
||||
*
|
||||
* - `err: {?Error}` - An `Error` if an error occured; otherwise `null`.
|
||||
* - `user: {Object}|{boolean}` - An `Object` representing the authenticated
|
||||
* user if verification was successful; otherwise `false`.
|
||||
* - `info: {Object}`: Additional application-specific context that will be
|
||||
* passed through for additional request processing.
|
||||
* password, and must invoke `cb` to yield the result.
|
||||
*
|
||||
* @callback Strategy~verifyFn
|
||||
* @param {string} username - The username received in the request.
|
||||
* @param {string} password - The passport received in the request.
|
||||
* @param {Function} cb
|
||||
* @param {?Error} cb.err - An `Error` if an error occured; otherwise `null`.
|
||||
* @param {Object|boolean} cb.user - An `Object` representing the authenticated
|
||||
* user if verification was successful; otherwise `false`.
|
||||
* @param {Object} cb.info - Additional application-specific context that will be
|
||||
* passed through for additional request processing.
|
||||
*/
|
||||
|
||||
/**
|
||||
@@ -149,14 +147,7 @@ module.exports = Strategy;
|
||||
*
|
||||
* This function is called by `{@link Strategy}` to verify a username and
|
||||
* password when the `passReqToCallback` option is set, and must invoke `cb` to
|
||||
* yield the result. `cb` is an error-first callback with the following
|
||||
* signature: `cb(err, user, [info])` where:
|
||||
*
|
||||
* - `err: {?Error}` - An `Error` if an error occured; otherwise `null`.
|
||||
* - `user: {Object}|{boolean}` - An `Object` representing the authenticated
|
||||
* user if verification was successful; otherwise `false`.
|
||||
* - `info: {Object}`: Additional application-specific context that will be
|
||||
* passed through for additional request processing.
|
||||
* yield the result.
|
||||
*
|
||||
* @callback Strategy~verifyWithReqFn
|
||||
* @param {http.IncomingMessage} req - The Node.js {@link https://nodejs.org/api/http.html#class-httpincomingmessage `IncomingMessage`}
|
||||
@@ -164,4 +155,9 @@ module.exports = Strategy;
|
||||
* @param {string} username - The username received in the request.
|
||||
* @param {string} password - The passport received in the request.
|
||||
* @param {Function} cb
|
||||
* @param {?Error} cb.err - An `Error` if an error occured; otherwise `null`.
|
||||
* @param {Object|boolean} cb.user - An `Object` representing the authenticated
|
||||
* user if verification was successful; otherwise `false`.
|
||||
* @param {Object} cb.info - Additional application-specific context that will be
|
||||
* passed through for additional request processing.
|
||||
*/
|
||||
|
||||
Reference in New Issue
Block a user