43 lines
2.2 KiB
TypeScript
43 lines
2.2 KiB
TypeScript
export = reauthUser;
|
|
/** ****************************************************************************** */
|
|
/** ****************************************************************************** */
|
|
/** ****************************************************************************** */
|
|
/** ****************************************************************************** */
|
|
/** ****************************************************************************** */
|
|
/** ****************************************************************************** */
|
|
/**
|
|
* ==============================================================================
|
|
* Main Function
|
|
* ==============================================================================
|
|
* @async
|
|
*
|
|
* @param {object} params - Single Param object containing params
|
|
* @param {String} [params.key] - API Key
|
|
* @param {String} [params.database]- Target Database slug
|
|
* @param {http.ServerResponse} [params.response] - Http response object
|
|
* @param {http.IncomingMessage} [params.request] - Http request object
|
|
* @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
|
|
* @param {string} [params.encryptedUserString] - encrypted user string to use instead of getting from cookie header
|
|
* @param {string | number} [params.user_id] - User ID
|
|
* @param {boolean} [params.useLocal]
|
|
*
|
|
* @returns { Promise<import("../package-shared/types").APILoginFunctionReturn> }
|
|
*/
|
|
declare function reauthUser({ key, database, response, request, level, encryptionKey, encryptionSalt, additionalFields, encryptedUserString, user_id, useLocal, }: {
|
|
key?: string;
|
|
database?: string;
|
|
response?: http.ServerResponse;
|
|
request?: http.IncomingMessage;
|
|
level?: ("deep" | "normal");
|
|
encryptionKey?: string;
|
|
encryptionSalt?: string;
|
|
additionalFields?: string[];
|
|
encryptedUserString?: string;
|
|
user_id?: string | number;
|
|
useLocal?: boolean;
|
|
}): Promise<import("../package-shared/types").APILoginFunctionReturn>;
|
|
import http = require("http");
|