@nestjs-kit/better-auth 2.0.0 → 2.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -7
- package/dist/admin.cjs +3 -4
- package/dist/admin.d.cts +1 -3
- package/dist/admin.d.cts.map +1 -1
- package/dist/admin.d.mts +1 -3
- package/dist/admin.d.mts.map +1 -1
- package/dist/admin.mjs +3 -4
- package/dist/api-key.cjs +4 -5
- package/dist/api-key.d.cts +1 -3
- package/dist/api-key.d.cts.map +1 -1
- package/dist/api-key.d.mts +1 -3
- package/dist/api-key.d.mts.map +1 -1
- package/dist/api-key.mjs +4 -5
- package/dist/{auth-contracts-Brh_Qko9.d.cts → auth-contracts-CADGyI0O.d.mts} +3 -53
- package/dist/auth-contracts-CADGyI0O.d.mts.map +1 -0
- package/dist/{auth-contracts-Cz7C4_Ch.d.mts → auth-contracts-zvt8ysoZ.d.cts} +3 -53
- package/dist/auth-contracts-zvt8ysoZ.d.cts.map +1 -0
- package/dist/{auth-decorators-Cu_nxWnF.cjs → auth-decorators-CJKE9wlT.cjs} +8 -10
- package/dist/{auth-decorators-Cu_nxWnF.cjs.map → auth-decorators-CJKE9wlT.cjs.map} +1 -1
- package/dist/{auth-decorators-B1mFnGJ6.mjs → auth-decorators-CkNkLNpU.mjs} +8 -10
- package/dist/{auth-decorators-B1mFnGJ6.mjs.map → auth-decorators-CkNkLNpU.mjs.map} +1 -1
- package/dist/{auth-errors-C3rbTV9p.mjs → auth-errors-JjxGDVSt.mjs} +3 -5
- package/dist/{auth-errors-C3rbTV9p.mjs.map → auth-errors-JjxGDVSt.mjs.map} +1 -1
- package/dist/{auth-errors-DmiKl0L_.cjs → auth-errors-RW7hOVI-.cjs} +3 -5
- package/dist/{auth-errors-DmiKl0L_.cjs.map → auth-errors-RW7hOVI-.cjs.map} +1 -1
- package/dist/{auth-guard-h9QB_l11.mjs → auth-guard-Da92QEK5.mjs} +4 -5
- package/dist/{auth-guard-h9QB_l11.mjs.map → auth-guard-Da92QEK5.mjs.map} +1 -1
- package/dist/{auth-guard-CLyhAEEj.cjs → auth-guard-wapEh_M_.cjs} +4 -5
- package/dist/{auth-guard-CLyhAEEj.cjs.map → auth-guard-wapEh_M_.cjs.map} +1 -1
- package/dist/{auth-module-BgcY2HpA.cjs → auth-module-ab60-WJZ.cjs} +28 -47
- package/dist/auth-module-ab60-WJZ.cjs.map +1 -0
- package/dist/{auth-module-CtHx3gRU.mjs → auth-module-uy3BBWwR.mjs} +28 -47
- package/dist/auth-module-uy3BBWwR.mjs.map +1 -0
- package/dist/{auth-scope-interceptor-BjxAL1-S.cjs → auth-scope-interceptor-Bui20-Ps.cjs} +5 -7
- package/dist/{auth-scope-interceptor-BjxAL1-S.cjs.map → auth-scope-interceptor-Bui20-Ps.cjs.map} +1 -1
- package/dist/{auth-scope-interceptor-DYPn3b8M.mjs → auth-scope-interceptor-CvCQ52dV.mjs} +5 -7
- package/dist/{auth-scope-interceptor-DYPn3b8M.mjs.map → auth-scope-interceptor-CvCQ52dV.mjs.map} +1 -1
- package/dist/{bridge-protocol-c66aEkr5.mjs → bridge-protocol-CmRsff2P.mjs} +2 -3
- package/dist/{bridge-protocol-BDw8opAG.cjs.map → bridge-protocol-CmRsff2P.mjs.map} +1 -1
- package/dist/{bridge-protocol-BDw8opAG.cjs → bridge-protocol-DNFhIKdo.cjs} +2 -3
- package/dist/{bridge-protocol-c66aEkr5.mjs.map → bridge-protocol-DNFhIKdo.cjs.map} +1 -1
- package/dist/{decorate-Dt0e9K6R.mjs → decorate-bO-rBn-G.mjs} +5 -9
- package/dist/{decorate-Dt0e9K6R.mjs.map → decorate-bO-rBn-G.mjs.map} +1 -1
- package/dist/{decorate-Cr4Q7bNE.cjs → decorate-fMNf0caZ.cjs} +5 -9
- package/dist/{decorate-Cr4Q7bNE.cjs.map → decorate-fMNf0caZ.cjs.map} +1 -1
- package/dist/express.cjs +3 -4
- package/dist/express.d.cts +1 -3
- package/dist/express.d.cts.map +1 -1
- package/dist/express.d.mts +1 -3
- package/dist/express.d.mts.map +1 -1
- package/dist/express.mjs +3 -4
- package/dist/fastify.cjs +2 -3
- package/dist/fastify.d.cts +1 -3
- package/dist/fastify.d.cts.map +1 -1
- package/dist/fastify.d.mts +1 -3
- package/dist/fastify.d.mts.map +1 -1
- package/dist/fastify.mjs +2 -3
- package/dist/graphql.cjs +7 -9
- package/dist/graphql.cjs.map +1 -1
- package/dist/graphql.d.cts +1 -3
- package/dist/graphql.d.cts.map +1 -1
- package/dist/graphql.d.mts +1 -3
- package/dist/graphql.d.mts.map +1 -1
- package/dist/graphql.mjs +7 -9
- package/dist/graphql.mjs.map +1 -1
- package/dist/index.cjs +7 -7
- package/dist/index.d.cts +1 -1
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +7 -7
- package/dist/microservices.cjs +4 -6
- package/dist/microservices.cjs.map +1 -1
- package/dist/microservices.d.cts +1 -5
- package/dist/microservices.d.cts.map +1 -1
- package/dist/microservices.d.mts +1 -5
- package/dist/microservices.d.mts.map +1 -1
- package/dist/microservices.mjs +3 -5
- package/dist/microservices.mjs.map +1 -1
- package/dist/organization.cjs +3 -4
- package/dist/organization.d.cts +1 -3
- package/dist/organization.d.cts.map +1 -1
- package/dist/organization.d.mts +1 -3
- package/dist/organization.d.mts.map +1 -1
- package/dist/organization.mjs +3 -4
- package/dist/{platform-CZl7TY8j.mjs → platform-BKYVzAv1.mjs} +3 -5
- package/dist/{platform-CZl7TY8j.mjs.map → platform-BKYVzAv1.mjs.map} +1 -1
- package/dist/{platform-YICqqYv6.cjs → platform-C67dxSls.cjs} +3 -5
- package/dist/{platform-YICqqYv6.cjs.map → platform-C67dxSls.cjs.map} +1 -1
- package/dist/platform.cjs +1 -1
- package/dist/platform.d.cts +0 -2
- package/dist/platform.d.cts.map +1 -1
- package/dist/platform.d.mts +0 -2
- package/dist/platform.d.mts.map +1 -1
- package/dist/platform.mjs +1 -1
- package/dist/plugin.cjs +4 -8
- package/dist/plugin.cjs.map +1 -1
- package/dist/plugin.d.cts +0 -4
- package/dist/plugin.d.cts.map +1 -1
- package/dist/plugin.d.mts +0 -4
- package/dist/plugin.d.mts.map +1 -1
- package/dist/plugin.mjs +4 -8
- package/dist/plugin.mjs.map +1 -1
- package/dist/{principal-readings-Ied2staw.mjs → principal-readings-BuXTU0-2.mjs} +3 -4
- package/dist/{principal-readings-Ied2staw.mjs.map → principal-readings-BuXTU0-2.mjs.map} +1 -1
- package/dist/{principal-readings-Chmt6rQV.cjs → principal-readings-JLNT58k0.cjs} +3 -4
- package/dist/{principal-readings-Chmt6rQV.cjs.map → principal-readings-JLNT58k0.cjs.map} +1 -1
- package/dist/{rolldown-runtime-VH7oDXx4.cjs → rolldown-runtime-CmQyd0Gu.cjs} +1 -2
- package/dist/testing/conformance.cjs +24 -31
- package/dist/testing/conformance.cjs.map +1 -1
- package/dist/testing/conformance.d.cts +4 -14
- package/dist/testing/conformance.d.cts.map +1 -1
- package/dist/testing/conformance.d.mts +4 -14
- package/dist/testing/conformance.d.mts.map +1 -1
- package/dist/testing/conformance.mjs +23 -30
- package/dist/testing/conformance.mjs.map +1 -1
- package/dist/testing.cjs +6 -7
- package/dist/testing.d.cts +1 -3
- package/dist/testing.d.cts.map +1 -1
- package/dist/testing.d.mts +1 -3
- package/dist/testing.d.mts.map +1 -1
- package/dist/testing.mjs +6 -7
- package/dist/websockets.cjs +7 -10
- package/dist/websockets.cjs.map +1 -1
- package/dist/websockets.d.cts +1 -7
- package/dist/websockets.d.cts.map +1 -1
- package/dist/websockets.d.mts +1 -7
- package/dist/websockets.d.mts.map +1 -1
- package/dist/websockets.mjs +7 -10
- package/dist/websockets.mjs.map +1 -1
- package/package.json +25 -25
- package/dist/auth-contracts-Brh_Qko9.d.cts.map +0 -1
- package/dist/auth-contracts-Cz7C4_Ch.d.mts.map +0 -1
- package/dist/auth-module-BgcY2HpA.cjs.map +0 -1
- package/dist/auth-module-CtHx3gRU.mjs.map +0 -1
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { a as getAPIErrorHeaders, c as isConfigurationError, f as ErrorRedactor, i as createInfrastructureError, l as isInfrastructureError, n as BetterAuthConfigurationError, s as isAuthFailure, t as AuthFailures } from "./auth-errors-
|
|
2
|
-
import { A as SKIP_ORIGIN_CHECK_METADATA, B as getPrincipalSourcesToken, C as PRINCIPAL_RESOLVER, D as ROUTE_PLANNER, E as REQUIREMENTS_METADATA, F as getBetterAuthHandleToken, I as getBetterAuthInstanceToken, L as getBetterAuthOptionsToken, M as TRANSPORT_REGISTRY, N as USE_BETTER_AUTH_METADATA, O as SCOPE_CORE, R as getBetterAuthServiceToken, S as PRINCIPAL_READINGS, T as REQUEST_SCOPE, _ as MOUNT_COORDINATOR, a as ACCESS_METADATA, b as POLICY_RESOLVER, c as AUTH_INSTANCE_METADATA, d as FRESHNESS_METADATA, f as GUARD_CORE, g as INVOCATION_VALUES, h as INVOCATION_PARAMS_METADATA, i as ACCEPT_PRINCIPALS_METADATA, j as TRANSPORTS, k as SKIP_DEFAULT_REQUIREMENTS_METADATA, m as INSTANCE_REGISTRY, n as __decorateParam, o as AMBIGUOUS_INVOCATION_VALUE, r as __decorateMetadata, s as AUTH_ENHANCER, t as __decorate, u as FORWARD_COOKIES_METADATA, v as PLATFORMS, x as PRINCIPAL_PARAMS_METADATA, y as POLICY_INVOKER, z as getExtensionToken } from "./decorate-
|
|
3
|
-
import { a as absent, c as normalizeForRequest, i as MemoKeys, l as rejected, n as ScopeCore, o as authenticated, r as ChainPrincipalResolver, t as BetterAuthScopeInterceptor, u as requestHeaders } from "./auth-scope-interceptor-
|
|
4
|
-
import { n as GuardCore, t as BetterAuthGuard } from "./auth-guard-
|
|
5
|
-
import { n as EXTENSION_DEFINITION, t as BRIDGE_HANDLE } from "./bridge-protocol-
|
|
6
|
-
import { C as memoKey, S as RequestScope, b as readHookMetadata, u as Require, y as definePrincipalParam } from "./auth-decorators-
|
|
7
|
-
import {
|
|
8
|
-
import {
|
|
1
|
+
import { a as getAPIErrorHeaders, c as isConfigurationError, f as ErrorRedactor, i as createInfrastructureError, l as isInfrastructureError, n as BetterAuthConfigurationError, s as isAuthFailure, t as AuthFailures } from "./auth-errors-JjxGDVSt.mjs";
|
|
2
|
+
import { A as SKIP_ORIGIN_CHECK_METADATA, B as getPrincipalSourcesToken, C as PRINCIPAL_RESOLVER, D as ROUTE_PLANNER, E as REQUIREMENTS_METADATA, F as getBetterAuthHandleToken, I as getBetterAuthInstanceToken, L as getBetterAuthOptionsToken, M as TRANSPORT_REGISTRY, N as USE_BETTER_AUTH_METADATA, O as SCOPE_CORE, R as getBetterAuthServiceToken, S as PRINCIPAL_READINGS, T as REQUEST_SCOPE, _ as MOUNT_COORDINATOR, a as ACCESS_METADATA, b as POLICY_RESOLVER, c as AUTH_INSTANCE_METADATA, d as FRESHNESS_METADATA, f as GUARD_CORE, g as INVOCATION_VALUES, h as INVOCATION_PARAMS_METADATA, i as ACCEPT_PRINCIPALS_METADATA, j as TRANSPORTS, k as SKIP_DEFAULT_REQUIREMENTS_METADATA, m as INSTANCE_REGISTRY, n as __decorateParam, o as AMBIGUOUS_INVOCATION_VALUE, r as __decorateMetadata, s as AUTH_ENHANCER, t as __decorate, u as FORWARD_COOKIES_METADATA, v as PLATFORMS, x as PRINCIPAL_PARAMS_METADATA, y as POLICY_INVOKER, z as getExtensionToken } from "./decorate-bO-rBn-G.mjs";
|
|
3
|
+
import { a as absent, c as normalizeForRequest, i as MemoKeys, l as rejected, n as ScopeCore, o as authenticated, r as ChainPrincipalResolver, t as BetterAuthScopeInterceptor, u as requestHeaders } from "./auth-scope-interceptor-CvCQ52dV.mjs";
|
|
4
|
+
import { n as GuardCore, t as BetterAuthGuard } from "./auth-guard-Da92QEK5.mjs";
|
|
5
|
+
import { n as EXTENSION_DEFINITION, t as BRIDGE_HANDLE } from "./bridge-protocol-CmRsff2P.mjs";
|
|
6
|
+
import { C as memoKey, S as RequestScope, b as readHookMetadata, u as Require, y as definePrincipalParam } from "./auth-decorators-CkNkLNpU.mjs";
|
|
7
|
+
import { i as readBoundedBody } from "./platform-BKYVzAv1.mjs";
|
|
8
|
+
import { t as PrincipalReadings } from "./principal-readings-BuXTU0-2.mjs";
|
|
9
9
|
import { isAPIError } from "better-auth/api";
|
|
10
10
|
import { Controller, ForbiddenException, Get, Global, HttpException, Inject, Logger, Module, RequestMethod, UnauthorizedException, UseGuards, UseInterceptors, VERSION_NEUTRAL, VersioningType } from "@nestjs/common";
|
|
11
11
|
import { APP_GUARD, APP_INTERCEPTOR, ApplicationConfig, DiscoveryModule, DiscoveryService, HttpAdapterHost, MetadataScanner, ModuleRef, ModulesContainer, Reflector } from "@nestjs/core";
|
|
12
|
-
|
|
12
|
+
// src/route-planner.ts
|
|
13
13
|
function classes(target) {
|
|
14
14
|
const result = [];
|
|
15
15
|
for (let current = target; current && current !== Function.prototype; current = Object.getPrototypeOf(current)) result.push(current);
|
|
@@ -191,8 +191,7 @@ var RoutePlanner = class {
|
|
|
191
191
|
function intersection(sets, universe) {
|
|
192
192
|
return new Set([...universe].filter((kind) => sets.every((set) => set.has(kind))));
|
|
193
193
|
}
|
|
194
|
-
|
|
195
|
-
//#region src/authorization-evaluator.ts
|
|
194
|
+
// src/authorization-evaluator.ts
|
|
196
195
|
const allow = () => ({ effect: "allow" });
|
|
197
196
|
const deny = (input) => ({
|
|
198
197
|
effect: "deny",
|
|
@@ -356,8 +355,7 @@ var AuthorizationEvaluator = class {
|
|
|
356
355
|
return allow();
|
|
357
356
|
}
|
|
358
357
|
};
|
|
359
|
-
|
|
360
|
-
//#region src/trusted-origins.ts
|
|
358
|
+
// src/trusted-origins.ts
|
|
361
359
|
/** Auth route path exceptions never exempt application operations. */
|
|
362
360
|
function originChecksDisabled(context) {
|
|
363
361
|
return context.skipCSRFCheck || context.skipOriginCheck === true && context.options.advanced?.disableCSRFCheck === void 0;
|
|
@@ -438,8 +436,7 @@ var TrustedOrigins = class {
|
|
|
438
436
|
return context.isTrustedOrigin.call({ trustedOrigins }, origin, { allowRelativePaths: false });
|
|
439
437
|
}
|
|
440
438
|
};
|
|
441
|
-
|
|
442
|
-
//#region src/bridge-client.ts
|
|
439
|
+
// src/bridge-client.ts
|
|
443
440
|
/** Preserve capabilities lazily; spreading a ScopeView can extract credentials. */
|
|
444
441
|
function derivedScope(scope, init) {
|
|
445
442
|
const outer = scope.current();
|
|
@@ -522,8 +519,7 @@ var BridgeClient = class {
|
|
|
522
519
|
this.#registrations.length = 0;
|
|
523
520
|
}
|
|
524
521
|
};
|
|
525
|
-
|
|
526
|
-
//#region src/origin-check.ts
|
|
522
|
+
// src/origin-check.ts
|
|
527
523
|
const ORIGIN_PROOF = Symbol.for("@nestjs-kit/better-auth:origin-proof");
|
|
528
524
|
const ORIGIN_CALCULATION_FAILURES = Symbol.for("@nestjs-kit/better-auth:origin-calculation-failures");
|
|
529
525
|
function diagnosticOrigin(headers) {
|
|
@@ -668,8 +664,7 @@ var OriginCheck = class {
|
|
|
668
664
|
return this.init.context.isTrustedOrigin.call({ trustedOrigins }, value, { allowRelativePaths: false }) ? null : AuthFailures.forbidden("INVALID_ORIGIN");
|
|
669
665
|
}
|
|
670
666
|
};
|
|
671
|
-
|
|
672
|
-
//#region src/instance-registry.ts
|
|
667
|
+
// src/instance-registry.ts
|
|
673
668
|
/** Nest considers transient providers static; auth collaborators require singleton trees. */
|
|
674
669
|
function isSingletonDependencyTree(root) {
|
|
675
670
|
const pending = [root];
|
|
@@ -812,8 +807,7 @@ let InstanceRegistry = class InstanceRegistry {
|
|
|
812
807
|
}
|
|
813
808
|
};
|
|
814
809
|
InstanceRegistry = __decorate([__decorateParam(0, Inject(REQUEST_SCOPE)), __decorateMetadata("design:paramtypes", [Object])], InstanceRegistry);
|
|
815
|
-
|
|
816
|
-
//#region src/route-paths.ts
|
|
810
|
+
// src/route-paths.ts
|
|
817
811
|
function addLeadingSlash(path) {
|
|
818
812
|
if (typeof path !== "string" || path === "") return "";
|
|
819
813
|
return path.startsWith("/") || path.startsWith("{/") ? path : `/${path}`;
|
|
@@ -868,8 +862,7 @@ function composeRoutePaths(input, requestMethod, exclusions) {
|
|
|
868
862
|
}
|
|
869
863
|
return paths.map((path) => addLeadingSlash(path || "/")).map((path) => path === "/" ? path : stripEndSlash(path));
|
|
870
864
|
}
|
|
871
|
-
|
|
872
|
-
//#region src/boot-validator.ts
|
|
865
|
+
// src/boot-validator.ts
|
|
873
866
|
function requirementLeaves(expressions) {
|
|
874
867
|
return expressions.flatMap((expression) => "anyOf" in expression ? requirementLeaves(expression.anyOf) : "allOf" in expression ? requirementLeaves(expression.allOf) : [expression]);
|
|
875
868
|
}
|
|
@@ -1372,8 +1365,7 @@ BootValidator = __decorate([
|
|
|
1372
1365
|
__decorateParam(8, Inject(TRANSPORT_REGISTRY)),
|
|
1373
1366
|
__decorateParam(9, Inject(MOUNT_COORDINATOR))
|
|
1374
1367
|
], BootValidator);
|
|
1375
|
-
|
|
1376
|
-
//#region src/hook-binder.ts
|
|
1368
|
+
// src/hook-binder.ts
|
|
1377
1369
|
const DATABASE_TARGETS = [
|
|
1378
1370
|
"user",
|
|
1379
1371
|
"session",
|
|
@@ -1512,8 +1504,7 @@ HookBinder = __decorate([
|
|
|
1512
1504
|
__decorateParam(1, Inject(MetadataScanner)),
|
|
1513
1505
|
__decorateMetadata("design:paramtypes", [typeof DiscoveryService === "undefined" ? Object : DiscoveryService, typeof MetadataScanner === "undefined" ? Object : MetadataScanner])
|
|
1514
1506
|
], HookBinder);
|
|
1515
|
-
|
|
1516
|
-
//#region src/auth-exchange.ts
|
|
1507
|
+
// src/auth-exchange.ts
|
|
1517
1508
|
const HOP_HEADERS = [
|
|
1518
1509
|
"connection",
|
|
1519
1510
|
"keep-alive",
|
|
@@ -1710,8 +1701,7 @@ function betterAuthCorsOrigin(auth, options) {
|
|
|
1710
1701
|
})().then((allow) => callback(null, allow), (error) => callback(error instanceof Error ? error : /* @__PURE__ */ new Error("Failed to resolve trusted CORS origins")));
|
|
1711
1702
|
};
|
|
1712
1703
|
}
|
|
1713
|
-
|
|
1714
|
-
//#region src/mount-coordinator.ts
|
|
1704
|
+
// src/mount-coordinator.ts
|
|
1715
1705
|
const MOUNTED = Symbol.for("@nestjs-kit/better-auth:mounted");
|
|
1716
1706
|
function parseBodyLimit(input) {
|
|
1717
1707
|
if (input === void 0) return 1048576;
|
|
@@ -1861,8 +1851,7 @@ MountCoordinator = __decorate([
|
|
|
1861
1851
|
Object
|
|
1862
1852
|
])
|
|
1863
1853
|
], MountCoordinator);
|
|
1864
|
-
|
|
1865
|
-
//#region src/policy-resolver.ts
|
|
1854
|
+
// src/policy-resolver.ts
|
|
1866
1855
|
var PolicyResolver = class {
|
|
1867
1856
|
moduleRef;
|
|
1868
1857
|
cache = /* @__PURE__ */ new Map();
|
|
@@ -1883,8 +1872,7 @@ var PolicyResolver = class {
|
|
|
1883
1872
|
return policy;
|
|
1884
1873
|
}
|
|
1885
1874
|
};
|
|
1886
|
-
|
|
1887
|
-
//#region src/transport-registry.ts
|
|
1875
|
+
// src/transport-registry.ts
|
|
1888
1876
|
var TransportRegistry = class {
|
|
1889
1877
|
transports = [];
|
|
1890
1878
|
owners = /* @__PURE__ */ new WeakMap();
|
|
@@ -1921,8 +1909,7 @@ var TransportRegistry = class {
|
|
|
1921
1909
|
return call;
|
|
1922
1910
|
}
|
|
1923
1911
|
};
|
|
1924
|
-
|
|
1925
|
-
//#region src/auth-core-module.ts
|
|
1912
|
+
// src/auth-core-module.ts
|
|
1926
1913
|
const EVALUATOR = Symbol("authorization-evaluator");
|
|
1927
1914
|
const exports = [
|
|
1928
1915
|
INSTANCE_REGISTRY,
|
|
@@ -2151,8 +2138,7 @@ BetterAuthCoreModule = __decorate([
|
|
|
2151
2138
|
typeof BootValidator === "undefined" ? Object : BootValidator
|
|
2152
2139
|
])
|
|
2153
2140
|
], BetterAuthCoreModule);
|
|
2154
|
-
|
|
2155
|
-
//#region src/session-principal.ts
|
|
2141
|
+
// src/session-principal.ts
|
|
2156
2142
|
const SESSION_PRINCIPAL_KIND = "session";
|
|
2157
2143
|
const CurrentSession = definePrincipalParam({
|
|
2158
2144
|
kind: SESSION_PRINCIPAL_KIND,
|
|
@@ -2291,8 +2277,7 @@ const freshSession = (options = {}) => ({
|
|
|
2291
2277
|
params: options
|
|
2292
2278
|
});
|
|
2293
2279
|
const RequireFreshSession = (options) => Require(freshSession(options));
|
|
2294
|
-
|
|
2295
|
-
//#region src/auth-service.ts
|
|
2280
|
+
// src/auth-service.ts
|
|
2296
2281
|
let BetterAuthService = class BetterAuthService {
|
|
2297
2282
|
registry;
|
|
2298
2283
|
scope;
|
|
@@ -2414,8 +2399,7 @@ BetterAuthService = __decorate([
|
|
|
2414
2399
|
Object
|
|
2415
2400
|
])
|
|
2416
2401
|
], BetterAuthService);
|
|
2417
|
-
|
|
2418
|
-
//#region src/http-transport.ts
|
|
2402
|
+
// src/http-transport.ts
|
|
2419
2403
|
let HttpTransport = class HttpTransport {
|
|
2420
2404
|
adapterHost;
|
|
2421
2405
|
id = "http";
|
|
@@ -2511,8 +2495,7 @@ HttpTransport = __decorate([__decorateParam(0, Inject(HttpAdapterHost)), __decor
|
|
|
2511
2495
|
function httpTransport() {
|
|
2512
2496
|
return HttpTransport;
|
|
2513
2497
|
}
|
|
2514
|
-
|
|
2515
|
-
//#region src/auth-module-definition.ts
|
|
2498
|
+
// src/auth-module-definition.ts
|
|
2516
2499
|
function defineExtension(definition) {
|
|
2517
2500
|
return {
|
|
2518
2501
|
...definition,
|
|
@@ -2690,8 +2673,7 @@ function moduleDefinition(module, definition, async) {
|
|
|
2690
2673
|
exports
|
|
2691
2674
|
};
|
|
2692
2675
|
}
|
|
2693
|
-
|
|
2694
|
-
//#region src/auth-module.ts
|
|
2676
|
+
// src/auth-module.ts
|
|
2695
2677
|
var _BetterAuthModule;
|
|
2696
2678
|
let BetterAuthModule = _BetterAuthModule = class BetterAuthModule {
|
|
2697
2679
|
static forRoot(options) {
|
|
@@ -2702,7 +2684,6 @@ let BetterAuthModule = _BetterAuthModule = class BetterAuthModule {
|
|
|
2702
2684
|
}
|
|
2703
2685
|
};
|
|
2704
2686
|
BetterAuthModule = _BetterAuthModule = __decorate([Module({})], BetterAuthModule);
|
|
2705
|
-
//#endregion
|
|
2706
2687
|
export { deny as _, httpTransport as a, CurrentUser as c, freshSession as d, sessionPrincipal as f, definePolicy as g, allow as h, defineTransport as i, RequireFreshSession as l, AuthorizationEvaluator as m, defineExtension as n, BetterAuthService as o, betterAuthCorsOrigin as p, defineHttpPlatform as r, CurrentSession as s, BetterAuthModule as t, SESSION_PRINCIPAL_KIND as u };
|
|
2707
2688
|
|
|
2708
|
-
//# sourceMappingURL=auth-module-
|
|
2689
|
+
//# sourceMappingURL=auth-module-uy3BBWwR.mjs.map
|