This commit is contained in:
Tben 2023-08-12 05:20:17 +01:00
parent 3af34950e3
commit f34d90d147
3 changed files with 6 additions and 4 deletions

View File

@ -1,6 +1,6 @@
{
"name": "datasquirel",
"version": "1.4.7",
"version": "1.4.8",
"description": "Cloud-based SQL data management tool",
"main": "index.js",
"scripts": {

View File

@ -37,13 +37,14 @@ const userAuth = require("./user-auth");
* @param {String} params.database - Target Database
* @param {http.ServerResponse} params.response - Http response object
* @param {http.IncomingMessage} params.request - Http request object
* @param {*} params.level - Authentication level
* @param {("deep" | "normal")} [params.level] - Authentication level
* @param {String} params.encryptionKey - Encryption Key
* @param {String} params.encryptionSalt - Encryption Salt
* @param {string[]} [params.additionalFields] - Additional Fields to be added to the user object
*
* @returns { Promise<FunctionReturn> }
*/
async function reauthUser({ key, database, response, request, level, encryptionKey, encryptionSalt }) {
async function reauthUser({ key, database, response, request, level, encryptionKey, encryptionSalt, additionalFields }) {
/**
* Check Encryption Keys
*
@ -74,6 +75,7 @@ async function reauthUser({ key, database, response, request, level, encryptionK
const reqPayload = JSON.stringify({
existingUser: existingUser.payload,
database,
additionalFields,
});
const httpsRequest = https.request(

View File

@ -33,7 +33,7 @@ const parseCookies = require("../utils/functions/parseCookies");
* @param {http.IncomingMessage} params.request - Http request object
* @param {string} params.encryptionKey - Encryption Key
* @param {string} params.encryptionSalt - Encryption Salt
* @param {("deep" | "normal")?} [params.level] - Optional. "Deep" value indicates an extra layer of security
* @param {("deep" | "normal")} [params.level] - Optional. "Deep" value indicates an extra layer of security
* @param {string} params.database - Database Name
*
* @returns { AuthenticatedUserObject }