"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getRequestAuthContext = exports.runWithRequestAuthContext = void 0;
const node_async_hooks_1 = require("node:async_hooks");
const requestAuthStorage = new node_async_hooks_1.AsyncLocalStorage();
const runWithRequestAuthContext = (value, callback) => {
    requestAuthStorage.run(value, callback);
};
exports.runWithRequestAuthContext = runWithRequestAuthContext;
const getRequestAuthContext = () => {
    return requestAuthStorage.getStore() ?? null;
};
exports.getRequestAuthContext = getRequestAuthContext;
//# sourceMappingURL=RequestAuthContext.js.map