updates
This commit is contained in:
parent
3af34950e3
commit
f34d90d147
@ -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": {
|
||||
|
@ -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(
|
||||
|
@ -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 }
|
||||
|
Loading…
Reference in New Issue
Block a user