@nestjs-kit/better-auth 0.0.0-stage → 2.0.0
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/LICENSE +7 -0
- package/README.md +1078 -2
- package/dist/admin.cjs +88 -0
- package/dist/admin.cjs.map +1 -0
- package/dist/admin.d.cts +14 -0
- package/dist/admin.d.cts.map +1 -0
- package/dist/admin.d.mts +14 -0
- package/dist/admin.d.mts.map +1 -0
- package/dist/admin.mjs +85 -0
- package/dist/admin.mjs.map +1 -0
- package/dist/api-key.cjs +164 -0
- package/dist/api-key.cjs.map +1 -0
- package/dist/api-key.d.cts +42 -0
- package/dist/api-key.d.cts.map +1 -0
- package/dist/api-key.d.mts +42 -0
- package/dist/api-key.d.mts.map +1 -0
- package/dist/api-key.mjs +160 -0
- package/dist/api-key.mjs.map +1 -0
- package/dist/auth-contracts-Brh_Qko9.d.cts +1654 -0
- package/dist/auth-contracts-Brh_Qko9.d.cts.map +1 -0
- package/dist/auth-contracts-Cz7C4_Ch.d.mts +1654 -0
- package/dist/auth-contracts-Cz7C4_Ch.d.mts.map +1 -0
- package/dist/auth-decorators-B1mFnGJ6.mjs +284 -0
- package/dist/auth-decorators-B1mFnGJ6.mjs.map +1 -0
- package/dist/auth-decorators-Cu_nxWnF.cjs +421 -0
- package/dist/auth-decorators-Cu_nxWnF.cjs.map +1 -0
- package/dist/auth-errors-C3rbTV9p.mjs +301 -0
- package/dist/auth-errors-C3rbTV9p.mjs.map +1 -0
- package/dist/auth-errors-DmiKl0L_.cjs +378 -0
- package/dist/auth-errors-DmiKl0L_.cjs.map +1 -0
- package/dist/auth-guard-CLyhAEEj.cjs +136 -0
- package/dist/auth-guard-CLyhAEEj.cjs.map +1 -0
- package/dist/auth-guard-h9QB_l11.mjs +125 -0
- package/dist/auth-guard-h9QB_l11.mjs.map +1 -0
- package/dist/auth-module-BgcY2HpA.cjs +2809 -0
- package/dist/auth-module-BgcY2HpA.cjs.map +1 -0
- package/dist/auth-module-CtHx3gRU.mjs +2708 -0
- package/dist/auth-module-CtHx3gRU.mjs.map +1 -0
- package/dist/auth-scope-interceptor-BjxAL1-S.cjs +290 -0
- package/dist/auth-scope-interceptor-BjxAL1-S.cjs.map +1 -0
- package/dist/auth-scope-interceptor-DYPn3b8M.mjs +231 -0
- package/dist/auth-scope-interceptor-DYPn3b8M.mjs.map +1 -0
- package/dist/bridge-protocol-BDw8opAG.cjs +25 -0
- package/dist/bridge-protocol-BDw8opAG.cjs.map +1 -0
- package/dist/bridge-protocol-c66aEkr5.mjs +8 -0
- package/dist/bridge-protocol-c66aEkr5.mjs.map +1 -0
- package/dist/decorate-Cr4Q7bNE.cjs +319 -0
- package/dist/decorate-Cr4Q7bNE.cjs.map +1 -0
- package/dist/decorate-Dt0e9K6R.mjs +80 -0
- package/dist/decorate-Dt0e9K6R.mjs.map +1 -0
- package/dist/express.cjs +256 -0
- package/dist/express.cjs.map +1 -0
- package/dist/express.d.cts +37 -0
- package/dist/express.d.cts.map +1 -0
- package/dist/express.d.mts +37 -0
- package/dist/express.d.mts.map +1 -0
- package/dist/express.mjs +254 -0
- package/dist/express.mjs.map +1 -0
- package/dist/fastify.cjs +218 -0
- package/dist/fastify.cjs.map +1 -0
- package/dist/fastify.d.cts +28 -0
- package/dist/fastify.d.cts.map +1 -0
- package/dist/fastify.d.mts +28 -0
- package/dist/fastify.d.mts.map +1 -0
- package/dist/fastify.mjs +216 -0
- package/dist/fastify.mjs.map +1 -0
- package/dist/graphql.cjs +509 -0
- package/dist/graphql.cjs.map +1 -0
- package/dist/graphql.d.cts +38 -0
- package/dist/graphql.d.cts.map +1 -0
- package/dist/graphql.d.mts +38 -0
- package/dist/graphql.d.mts.map +1 -0
- package/dist/graphql.mjs +503 -0
- package/dist/graphql.mjs.map +1 -0
- package/dist/index.cjs +86 -0
- package/dist/index.d.cts +2 -0
- package/dist/index.d.mts +2 -0
- package/dist/index.mjs +8 -0
- package/dist/microservices.cjs +231 -0
- package/dist/microservices.cjs.map +1 -0
- package/dist/microservices.d.cts +39 -0
- package/dist/microservices.d.cts.map +1 -0
- package/dist/microservices.d.mts +39 -0
- package/dist/microservices.d.mts.map +1 -0
- package/dist/microservices.mjs +222 -0
- package/dist/microservices.mjs.map +1 -0
- package/dist/organization.cjs +191 -0
- package/dist/organization.cjs.map +1 -0
- package/dist/organization.d.cts +40 -0
- package/dist/organization.d.cts.map +1 -0
- package/dist/organization.d.mts +40 -0
- package/dist/organization.d.mts.map +1 -0
- package/dist/organization.mjs +177 -0
- package/dist/organization.mjs.map +1 -0
- package/dist/platform-CZl7TY8j.mjs +414 -0
- package/dist/platform-CZl7TY8j.mjs.map +1 -0
- package/dist/platform-YICqqYv6.cjs +473 -0
- package/dist/platform-YICqqYv6.cjs.map +1 -0
- package/dist/platform.cjs +10 -0
- package/dist/platform.d.cts +43 -0
- package/dist/platform.d.cts.map +1 -0
- package/dist/platform.d.mts +43 -0
- package/dist/platform.d.mts.map +1 -0
- package/dist/platform.mjs +1 -0
- package/dist/plugin.cjs +323 -0
- package/dist/plugin.cjs.map +1 -0
- package/dist/plugin.d.cts +24 -0
- package/dist/plugin.d.cts.map +1 -0
- package/dist/plugin.d.mts +24 -0
- package/dist/plugin.d.mts.map +1 -0
- package/dist/plugin.mjs +321 -0
- package/dist/plugin.mjs.map +1 -0
- package/dist/principal-readings-Chmt6rQV.cjs +208 -0
- package/dist/principal-readings-Chmt6rQV.cjs.map +1 -0
- package/dist/principal-readings-Ied2staw.mjs +191 -0
- package/dist/principal-readings-Ied2staw.mjs.map +1 -0
- package/dist/rolldown-runtime-VH7oDXx4.cjs +28 -0
- package/dist/testing/conformance.cjs +6214 -0
- package/dist/testing/conformance.cjs.map +1 -0
- package/dist/testing/conformance.d.cts +528 -0
- package/dist/testing/conformance.d.cts.map +1 -0
- package/dist/testing/conformance.d.mts +528 -0
- package/dist/testing/conformance.d.mts.map +1 -0
- package/dist/testing/conformance.mjs +6204 -0
- package/dist/testing/conformance.mjs.map +1 -0
- package/dist/testing.cjs +221 -0
- package/dist/testing.cjs.map +1 -0
- package/dist/testing.d.cts +64 -0
- package/dist/testing.d.cts.map +1 -0
- package/dist/testing.d.mts +64 -0
- package/dist/testing.d.mts.map +1 -0
- package/dist/testing.mjs +214 -0
- package/dist/testing.mjs.map +1 -0
- package/dist/websockets.cjs +396 -0
- package/dist/websockets.cjs.map +1 -0
- package/dist/websockets.d.cts +67 -0
- package/dist/websockets.d.cts.map +1 -0
- package/dist/websockets.d.mts +67 -0
- package/dist/websockets.d.mts.map +1 -0
- package/dist/websockets.mjs +383 -0
- package/dist/websockets.mjs.map +1 -0
- package/package.json +327 -3
|
@@ -0,0 +1,125 @@
|
|
|
1
|
+
import { c as isConfigurationError, l as isInfrastructureError, n as BetterAuthConfigurationError, s as isAuthFailure, t as AuthFailures } from "./auth-errors-C3rbTV9p.mjs";
|
|
2
|
+
import { f as GUARD_CORE, n as __decorateParam, r as __decorateMetadata, s as AUTH_ENHANCER, t as __decorate } from "./decorate-Dt0e9K6R.mjs";
|
|
3
|
+
import { Inject, Injectable } from "@nestjs/common";
|
|
4
|
+
//#region src/auth-guard.ts
|
|
5
|
+
let BetterAuthGuard = class BetterAuthGuard {
|
|
6
|
+
core;
|
|
7
|
+
static [AUTH_ENHANCER] = "guard";
|
|
8
|
+
[AUTH_ENHANCER] = "guard";
|
|
9
|
+
constructor(core) {
|
|
10
|
+
this.core = core;
|
|
11
|
+
}
|
|
12
|
+
canActivate(context) {
|
|
13
|
+
return this.core.canActivate(context);
|
|
14
|
+
}
|
|
15
|
+
};
|
|
16
|
+
BetterAuthGuard = __decorate([
|
|
17
|
+
Injectable(),
|
|
18
|
+
__decorateParam(0, Inject(GUARD_CORE)),
|
|
19
|
+
__decorateMetadata("design:paramtypes", [typeof Pick === "undefined" ? Object : Pick])
|
|
20
|
+
], BetterAuthGuard);
|
|
21
|
+
var GuardCore = class {
|
|
22
|
+
instances;
|
|
23
|
+
planner;
|
|
24
|
+
transports;
|
|
25
|
+
resolver;
|
|
26
|
+
evaluator;
|
|
27
|
+
scope;
|
|
28
|
+
readings;
|
|
29
|
+
constructor(instances, planner, transports, resolver, evaluator, scope, readings) {
|
|
30
|
+
this.instances = instances;
|
|
31
|
+
this.planner = planner;
|
|
32
|
+
this.transports = transports;
|
|
33
|
+
this.resolver = resolver;
|
|
34
|
+
this.evaluator = evaluator;
|
|
35
|
+
this.scope = scope;
|
|
36
|
+
this.readings = readings;
|
|
37
|
+
}
|
|
38
|
+
async canActivate(context) {
|
|
39
|
+
let transport;
|
|
40
|
+
let call;
|
|
41
|
+
let plan;
|
|
42
|
+
try {
|
|
43
|
+
plan = this.planner.forContext(context);
|
|
44
|
+
if (plan.access === "inherit") {
|
|
45
|
+
transport = this.transports.find(context);
|
|
46
|
+
const lineage = transport?.lineage?.(context);
|
|
47
|
+
if (lineage && !this.readings.enclosing(lineage, context.getArgs())) {
|
|
48
|
+
call = this.transports.describe(context, transport);
|
|
49
|
+
throw BetterAuthConfigurationError.atRequest("NO_ENCLOSING_DECISION", "An inherited invocation has no enclosing guard decision", { site: plan.site });
|
|
50
|
+
}
|
|
51
|
+
if (plan.originCheck !== "form") return true;
|
|
52
|
+
}
|
|
53
|
+
if (plan.access === "public" && plan.originCheck !== "form") {
|
|
54
|
+
const lineage = this.transports.find(context)?.lineage?.(context);
|
|
55
|
+
if (lineage && !plan.nested) this.readings.recordLineage(lineage, {
|
|
56
|
+
outcome: "no-identity",
|
|
57
|
+
instance: plan.instance
|
|
58
|
+
});
|
|
59
|
+
return true;
|
|
60
|
+
}
|
|
61
|
+
transport = this.transports.select(context);
|
|
62
|
+
call = this.transports.describe(context, transport);
|
|
63
|
+
const entry = this.instances.get(plan.instance);
|
|
64
|
+
if (plan.originCheck !== "off") {
|
|
65
|
+
const browser = call.browser;
|
|
66
|
+
if (browser) {
|
|
67
|
+
if (plan.originCheck === "form" || browser.enforce) {
|
|
68
|
+
const failure = await entry.origin.check(browser, plan.originCheck);
|
|
69
|
+
if (failure) throw failure;
|
|
70
|
+
} else await entry.origin.advisory(browser);
|
|
71
|
+
}
|
|
72
|
+
}
|
|
73
|
+
if (plan.access === "inherit") return true;
|
|
74
|
+
if (plan.access === "public") {
|
|
75
|
+
if (!plan.nested) this.readings.record(call, {
|
|
76
|
+
outcome: "no-identity",
|
|
77
|
+
instance: plan.instance
|
|
78
|
+
});
|
|
79
|
+
return true;
|
|
80
|
+
}
|
|
81
|
+
const result = await this.resolver.resolve(call, {
|
|
82
|
+
auth: entry.handle,
|
|
83
|
+
freshness: plan.freshness,
|
|
84
|
+
accepts: plan.accepts,
|
|
85
|
+
sourceSet: plan.sourceSet
|
|
86
|
+
});
|
|
87
|
+
this.readings.record(call, {
|
|
88
|
+
...result,
|
|
89
|
+
instance: plan.instance
|
|
90
|
+
});
|
|
91
|
+
if (result.outcome === "rejected") throw result.failure;
|
|
92
|
+
if (result.outcome === "absent") {
|
|
93
|
+
if (plan.access === "optional") return true;
|
|
94
|
+
throw AuthFailures.unauthenticated();
|
|
95
|
+
}
|
|
96
|
+
if (!plan.accepts.has(result.principal.kind)) throw AuthFailures.forbidden("PRINCIPAL_NOT_SUPPORTED");
|
|
97
|
+
const decision = await this.evaluator.evaluate(plan, result.principal, call, entry, context, transport.id);
|
|
98
|
+
if (decision.effect === "deny") throw AuthFailures.rejected({
|
|
99
|
+
status: decision.status ?? 403,
|
|
100
|
+
reason: decision.reason,
|
|
101
|
+
message: decision.message,
|
|
102
|
+
challenge: decision.challenge
|
|
103
|
+
});
|
|
104
|
+
return true;
|
|
105
|
+
} catch (error) {
|
|
106
|
+
if (isAuthFailure(error) && transport) {
|
|
107
|
+
const mapping = plan && this.instances.get(plan.instance).options.errors?.map;
|
|
108
|
+
throw mapping ? mapping(error, context, transport.id) : transport.toException(error, context);
|
|
109
|
+
}
|
|
110
|
+
if ((isConfigurationError(error) || isInfrastructureError(error)) && transport) {
|
|
111
|
+
const repeated = call ? this.scope.surfaced(call.key, error, {
|
|
112
|
+
instance: plan?.instance ?? "default",
|
|
113
|
+
site: plan?.site ?? "guard",
|
|
114
|
+
lineage: call.lineage
|
|
115
|
+
}) : false;
|
|
116
|
+
throw transport.toInternalException?.(error, context, { repeated }) ?? error;
|
|
117
|
+
}
|
|
118
|
+
throw error;
|
|
119
|
+
}
|
|
120
|
+
}
|
|
121
|
+
};
|
|
122
|
+
//#endregion
|
|
123
|
+
export { GuardCore as n, BetterAuthGuard as t };
|
|
124
|
+
|
|
125
|
+
//# sourceMappingURL=auth-guard-h9QB_l11.mjs.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"auth-guard-h9QB_l11.mjs","names":[],"sources":["../src/auth-guard.ts"],"sourcesContent":["import {\n Inject,\n Injectable,\n type CanActivate,\n type ExecutionContext,\n} from \"@nestjs/common\";\nimport type {\n AuthTransport,\n PrincipalResolver,\n RoutePlan,\n TransportCall,\n} from \"./auth-contracts.js\";\nimport {\n AuthFailures,\n BetterAuthConfigurationError,\n isAuthFailure,\n isConfigurationError,\n isInfrastructureError,\n} from \"./auth-errors.js\";\nimport { AUTH_ENHANCER, GUARD_CORE } from \"./auth-tokens.js\";\nimport type { AuthorizationEvaluator } from \"./authorization-evaluator.js\";\nimport type { InstanceLookup } from \"./instance-registry.js\";\nimport type { PrincipalReadings } from \"./principal-readings.js\";\nimport type { RequestScope } from \"./request-scope.js\";\nimport type { RoutePlanner } from \"./route-planner.js\";\nimport type { TransportRegistry } from \"./transport-registry.js\";\n\n@Injectable()\nexport class BetterAuthGuard implements CanActivate {\n static readonly [AUTH_ENHANCER] = \"guard\";\n readonly [AUTH_ENHANCER] = \"guard\";\n\n constructor(\n @Inject(GUARD_CORE) private readonly core: Pick<GuardCore, \"canActivate\">,\n ) {}\n\n canActivate(context: ExecutionContext): Promise<boolean> {\n return this.core.canActivate(context);\n }\n}\nexport class GuardCore implements CanActivate {\n constructor(\n private readonly instances: InstanceLookup,\n private readonly planner: RoutePlanner,\n private readonly transports: TransportRegistry,\n private readonly resolver: PrincipalResolver,\n private readonly evaluator: AuthorizationEvaluator,\n private readonly scope: RequestScope,\n private readonly readings: PrincipalReadings,\n ) {}\n\n async canActivate(context: ExecutionContext): Promise<boolean> {\n let transport: AuthTransport | undefined;\n let call: TransportCall | undefined;\n let plan: RoutePlan | undefined;\n try {\n plan = this.planner.forContext(context);\n if (plan.access === \"inherit\") {\n transport = this.transports.find(context);\n const lineage = transport?.lineage?.(context);\n if (lineage && !this.readings.enclosing(lineage, context.getArgs())) {\n call = this.transports.describe(context, transport);\n throw BetterAuthConfigurationError.atRequest(\n \"NO_ENCLOSING_DECISION\",\n \"An inherited invocation has no enclosing guard decision\",\n { site: plan.site },\n );\n }\n if (plan.originCheck !== \"form\") {\n return true;\n }\n }\n if (plan.access === \"public\" && plan.originCheck !== \"form\") {\n const lineage = this.transports.find(context)?.lineage?.(context);\n if (lineage && !plan.nested) {\n this.readings.recordLineage(lineage, {\n outcome: \"no-identity\",\n instance: plan.instance,\n });\n }\n return true;\n }\n transport = this.transports.select(context);\n call = this.transports.describe(context, transport);\n const entry = this.instances.get(plan.instance);\n if (plan.originCheck !== \"off\") {\n const browser = call.browser;\n if (browser) {\n if (plan.originCheck === \"form\" || browser.enforce) {\n const failure = await entry.origin.check(browser, plan.originCheck);\n if (failure) {\n throw failure;\n }\n } else {\n await entry.origin.advisory(browser);\n }\n }\n }\n if (plan.access === \"inherit\") {\n return true;\n }\n if (plan.access === \"public\") {\n if (!plan.nested) {\n this.readings.record(call, {\n outcome: \"no-identity\",\n instance: plan.instance,\n });\n }\n return true;\n }\n const result = await this.resolver.resolve(call, {\n auth: entry.handle,\n freshness: plan.freshness,\n accepts: plan.accepts,\n sourceSet: plan.sourceSet,\n });\n this.readings.record(call, { ...result, instance: plan.instance });\n if (result.outcome === \"rejected\") {\n throw result.failure;\n }\n if (result.outcome === \"absent\") {\n if (plan.access === \"optional\") {\n return true;\n }\n throw AuthFailures.unauthenticated();\n }\n if (!plan.accepts.has(result.principal.kind)) {\n throw AuthFailures.forbidden(\"PRINCIPAL_NOT_SUPPORTED\");\n }\n const decision = await this.evaluator.evaluate(\n plan,\n result.principal,\n call,\n entry,\n context,\n transport.id,\n );\n if (decision.effect === \"deny\") {\n throw AuthFailures.rejected({\n status: decision.status ?? 403,\n reason: decision.reason,\n message: decision.message,\n challenge: decision.challenge,\n });\n }\n return true;\n } catch (error) {\n if (isAuthFailure(error) && transport) {\n const mapping =\n plan && this.instances.get(plan.instance).options.errors?.map;\n throw mapping\n ? mapping(error, context, transport.id)\n : transport.toException(error, context);\n }\n if (\n (isConfigurationError(error) || isInfrastructureError(error)) &&\n transport\n ) {\n const repeated = call\n ? this.scope.surfaced(call.key, error, {\n instance: plan?.instance ?? \"default\",\n site: plan?.site ?? \"guard\",\n lineage: call.lineage,\n })\n : false;\n throw (\n transport.toInternalException?.(error, context, { repeated }) ?? error\n );\n }\n throw error;\n }\n }\n}\n"],"mappings":";;;;AA4BO,IAAM,kBAAN,MAAM,gBAAuC;CAKX;CAJvC,QAAiB,iBAAiB;CAClC,CAAU,iBAAiB;CAE3B,YACE,MACA;EADqC,KAAA,OAAA;CACpC;CAEH,YAAY,SAA6C;EACvD,OAAO,KAAK,KAAK,YAAY,OAAO;CACtC;AACF;;CAZC,WAAW;CAMP,gBAAA,GAAA,OAAO,UAAU,CAAA;;;AAOtB,IAAa,YAAb,MAA8C;CAEzB;CACA;CACA;CACA;CACA;CACA;CACA;CAPnB,YACE,WACA,SACA,YACA,UACA,WACA,OACA,UACA;EAPiB,KAAA,YAAA;EACA,KAAA,UAAA;EACA,KAAA,aAAA;EACA,KAAA,WAAA;EACA,KAAA,YAAA;EACA,KAAA,QAAA;EACA,KAAA,WAAA;CAChB;CAEH,MAAM,YAAY,SAA6C;EAC7D,IAAI;EACJ,IAAI;EACJ,IAAI;EACJ,IAAI;GACF,OAAO,KAAK,QAAQ,WAAW,OAAO;GACtC,IAAI,KAAK,WAAW,WAAW;IAC7B,YAAY,KAAK,WAAW,KAAK,OAAO;IACxC,M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