2024-11-08 15:44:31 +00:00
|
|
|
export = reauthUser;
|
|
|
|
/** ****************************************************************************** */
|
|
|
|
/** ****************************************************************************** */
|
|
|
|
/** ****************************************************************************** */
|
|
|
|
/** ****************************************************************************** */
|
|
|
|
/** ****************************************************************************** */
|
|
|
|
/** ****************************************************************************** */
|
|
|
|
/**
|
|
|
|
* ==============================================================================
|
|
|
|
* Main Function
|
|
|
|
* ==============================================================================
|
|
|
|
* @async
|
|
|
|
*
|
|
|
|
* @param {object} params - Single Param object containing params
|
2024-12-08 08:58:57 +00:00
|
|
|
* @param {String} [params.key] - API Key
|
2024-12-09 11:45:39 +00:00
|
|
|
* @param {String} [params.database]- Target Database slug
|
2024-12-08 08:58:57 +00:00
|
|
|
* @param {http.ServerResponse} [params.response] - Http response object
|
|
|
|
* @param {http.IncomingMessage} [params.request] - Http request object
|
2024-11-08 15:44:31 +00:00
|
|
|
* @param {("deep" | "normal")} [params.level] - Authentication level
|
2024-12-08 08:58:57 +00:00
|
|
|
* @param {String} [params.encryptionKey] - Encryption Key
|
|
|
|
* @param {String} [params.encryptionSalt] - Encryption Salt
|
2024-11-08 15:44:31 +00:00
|
|
|
* @param {string[]} [params.additionalFields] - Additional Fields to be added to the user object
|
2024-12-08 08:58:57 +00:00
|
|
|
* @param {string} [params.encryptedUserString] - encrypted user string to use instead of getting from cookie header
|
2024-12-09 11:45:39 +00:00
|
|
|
* @param {string | number} [params.user_id] - User ID
|
2024-12-06 11:55:03 +00:00
|
|
|
* @param {boolean} [params.useLocal]
|
2024-11-08 15:44:31 +00:00
|
|
|
*
|
2024-12-08 08:58:57 +00:00
|
|
|
* @returns { Promise<import("../package-shared/types").APILoginFunctionReturn> }
|
2024-11-08 15:44:31 +00:00
|
|
|
*/
|
2024-12-08 08:58:57 +00:00
|
|
|
declare function reauthUser({ key, database, response, request, level, encryptionKey, encryptionSalt, additionalFields, encryptedUserString, user_id, useLocal, }: {
|
|
|
|
key?: string;
|
2024-12-09 11:45:39 +00:00
|
|
|
database?: string;
|
2024-12-08 08:58:57 +00:00
|
|
|
response?: http.ServerResponse;
|
|
|
|
request?: http.IncomingMessage;
|
2024-11-08 15:44:31 +00:00
|
|
|
level?: ("deep" | "normal");
|
2024-12-08 08:58:57 +00:00
|
|
|
encryptionKey?: string;
|
|
|
|
encryptionSalt?: string;
|
2024-11-08 15:44:31 +00:00
|
|
|
additionalFields?: string[];
|
2024-12-08 08:58:57 +00:00
|
|
|
encryptedUserString?: string;
|
2024-12-09 11:45:39 +00:00
|
|
|
user_id?: string | number;
|
2024-12-06 11:55:03 +00:00
|
|
|
useLocal?: boolean;
|
2024-12-08 08:58:57 +00:00
|
|
|
}): Promise<import("../package-shared/types").APILoginFunctionReturn>;
|
2024-11-08 15:44:31 +00:00
|
|
|
import http = require("http");
|