datasquirel/dist/users/user-auth.d.ts
Benjamin Toby a3561da53d Updates
2025-01-10 20:35:05 +01:00

29 lines
991 B
TypeScript

import http from "http";
import { AuthenticatedUser } from "../package-shared/types";
type Param = {
request?: http.IncomingMessage & {
[s: string]: any;
};
req?: http.IncomingMessage & {
[s: string]: any;
};
cookieString?: string;
encryptedUserString?: string;
encryptionKey?: string;
encryptionSalt?: string;
level?: "deep" | "normal";
database?: string;
dsqlUserId?: string | number;
expiry?: number;
csrfHeaderName?: string;
csrfHeaderIsValue?: boolean;
};
/**
* Authenticate User from request
* ==============================================================================
* @description This Function takes in a request object and returns a user object
* with the user's data
*/
export default function userAuth({ request, req, encryptionKey, encryptionSalt, level, database, dsqlUserId, encryptedUserString, expiry, cookieString, csrfHeaderIsValue, csrfHeaderName, }: Param): AuthenticatedUser;
export {};