datasquirel/users/get-token.d.ts
Benjamin Toby 8a8257d17e Updates
2024-12-06 12:55:03 +01:00

34 lines
1.5 KiB
TypeScript

export = getToken;
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/** ****************************************************************************** */
/**
* Get just the access token for user
* ==============================================================================
* @description This Function takes in a request object and returns a user token
* string and csrf token string
*
* @param {Object} params - Arg
* @param {http.IncomingMessage} params.request - Http request object
* @param {string} params.encryptionKey - Encryption Key
* @param {string} params.encryptionSalt - Encryption Salt
* @param {string} params.database - Database Name
* @param {boolean} [params.useLocal]
*
* @returns {{ key: string | undefined, csrf: string | undefined }}
*/
declare function getToken({ request, encryptionKey, encryptionSalt, database, useLocal, }: {
request: http.IncomingMessage;
encryptionKey: string;
encryptionSalt: string;
database: string;
useLocal?: boolean;
}): {
key: string | undefined;
csrf: string | undefined;
};
import http = require("http");