Improve jsdoc.

This commit is contained in:
Jared Hanson
2022-11-23 13:02:11 -08:00
parent 2cafc5a111
commit 839b4f9ed4
+12 -16
View File
@@ -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.
*/