Added JSDoc for server/

Signed-off-by: Matthew Nickson <mnickson@sidingsmedia.com>
This commit is contained in:
Matthew Nickson 2023-01-05 22:19:05 +00:00
parent c7eb72e73b
commit caff9ca736
No known key found for this signature in database
GPG key ID: BF229DCFD4748E05
10 changed files with 104 additions and 4 deletions

View file

@ -63,6 +63,12 @@ function myAuthorizer(username, password, callback) {
});
}
/**
* Use basic auth if auth is not disabled
* @param {express.Request} req Express request object
* @param {express.Response} res Express response object
* @param {express.NextFunction} next
*/
exports.basicAuth = async function (req, res, next) {
const middleware = basicAuth({
authorizer: myAuthorizer,