@schemavaults/auth-server-sdk 0.22.79 → 0.22.81
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/dist/cli.cjs
CHANGED
|
@@ -89,7 +89,7 @@ var init_resolve_codegen_templates_directory = __esm({
|
|
|
89
89
|
|
|
90
90
|
// src/NextjsAppDirectoryPlugin/codegen-marker.ts
|
|
91
91
|
function getCodegenMarkerComment() {
|
|
92
|
-
const version = true ? "0.22.
|
|
92
|
+
const version = true ? "0.22.81" : "unknown";
|
|
93
93
|
return `${CODEGEN_MARKER_PREFIX}${version}`;
|
|
94
94
|
}
|
|
95
95
|
function hasCodegenMarker(firstLine) {
|
|
@@ -331,7 +331,7 @@ async function main() {
|
|
|
331
331
|
return;
|
|
332
332
|
}
|
|
333
333
|
if (args.includes("--version") || args.includes("-v")) {
|
|
334
|
-
console.log(`${PACKAGE_NAME}@${"0.22.
|
|
334
|
+
console.log(`${PACKAGE_NAME}@${"0.22.81"}`);
|
|
335
335
|
return;
|
|
336
336
|
}
|
|
337
337
|
const command = args.find((arg) => !arg.startsWith("-")) ?? "codegen";
|
|
@@ -3,14 +3,59 @@ import type { InitRouteGuardCheckOptions } from "./init_route_guard_check_option
|
|
|
3
3
|
import type { PotentiallyValidTokenSource } from "@schemavaults/auth-common";
|
|
4
4
|
import { type ApiServerId, type SchemaVaultsAppEnvironment } from "@schemavaults/app-definitions";
|
|
5
5
|
import { type IJwtKeyManager } from "../JwtKeyManager";
|
|
6
|
+
/**
|
|
7
|
+
* Constructor options for {@link RouteGuardFactory}.
|
|
8
|
+
*/
|
|
6
9
|
export interface RouteGuardFactoryInitOptions {
|
|
10
|
+
/**
|
|
11
|
+
* The deployment environment (e.g. `development`, `staging`, `production`)
|
|
12
|
+
* the factory is operating in. Used to validate the `iss`/audience of
|
|
13
|
+
* incoming JWTs against the expected auth server for that environment.
|
|
14
|
+
*/
|
|
7
15
|
environment: SchemaVaultsAppEnvironment;
|
|
16
|
+
/**
|
|
17
|
+
* The JWT key manager used to fetch the signing keys needed to verify
|
|
18
|
+
* tokens.
|
|
19
|
+
*
|
|
20
|
+
* - **Required** when {@link RouteGuardFactoryInitOptions.is_auth_server} is
|
|
21
|
+
* `true` (the auth server must supply its own local key manager).
|
|
22
|
+
* - **Optional** for resource servers: when omitted, a
|
|
23
|
+
* {@link RemoteJwtKeyManager} is created that loads keys remotely from the
|
|
24
|
+
* auth server (resolved via `getSchemaVaultsAuthServerUri()`).
|
|
25
|
+
*/
|
|
8
26
|
jwt_keys_manager?: IJwtKeyManager;
|
|
27
|
+
/**
|
|
28
|
+
* Set to `true` only when this factory runs inside the auth server itself.
|
|
29
|
+
* When `true`, a {@link RouteGuardFactoryInitOptions.jwt_keys_manager} must
|
|
30
|
+
* be provided. Defaults to `false` (i.e. a remote resource server).
|
|
31
|
+
*/
|
|
9
32
|
is_auth_server?: boolean;
|
|
33
|
+
/**
|
|
34
|
+
* When `true`, the factory and the guards it creates emit verbose
|
|
35
|
+
* `console.log` diagnostics. Defaults to `false`.
|
|
36
|
+
*/
|
|
10
37
|
debug?: boolean;
|
|
11
38
|
}
|
|
12
39
|
declare const GUARD_TYPES: readonly ["authenticated", "admin"];
|
|
13
40
|
type RouteGuardType = (typeof GUARD_TYPES)[number];
|
|
41
|
+
/**
|
|
42
|
+
* Factory for constructing {@link IRouteGuard} instances that protect API
|
|
43
|
+
* routes and server components.
|
|
44
|
+
*
|
|
45
|
+
* A guard verifies the caller's identity (and, depending on the guard type,
|
|
46
|
+
* their privileges) before a protected handler runs. The factory exposes
|
|
47
|
+
* several entry points depending on what you already have in hand:
|
|
48
|
+
*
|
|
49
|
+
* - {@link RouteGuardFactory.createGuardFromOptions} — you already have a
|
|
50
|
+
* decoded user (no token verification performed).
|
|
51
|
+
* - {@link RouteGuardFactory.createGuardFromTokenSources} — you have one or
|
|
52
|
+
* more raw tokens to verify.
|
|
53
|
+
* - {@link RouteGuardFactory.createGuardFromAuthHeader} — you have a raw HTTP
|
|
54
|
+
* `Authorization` header value to parse and verify.
|
|
55
|
+
*
|
|
56
|
+
* Guard types currently supported: `"authenticated"` (any signed-in user) and
|
|
57
|
+
* `"admin"` (signed-in users with admin privileges).
|
|
58
|
+
*/
|
|
14
59
|
export declare class RouteGuardFactory {
|
|
15
60
|
private readonly jwt_keys_manager;
|
|
16
61
|
private readonly environment;
|
|
@@ -18,9 +63,79 @@ export declare class RouteGuardFactory {
|
|
|
18
63
|
private readonly is_auth_server;
|
|
19
64
|
constructor({ environment, ...opts }: RouteGuardFactoryInitOptions);
|
|
20
65
|
private static isValidRouteGuardType;
|
|
66
|
+
/**
|
|
67
|
+
* Construct a guard directly from an already-resolved user/options object,
|
|
68
|
+
* without performing any token verification.
|
|
69
|
+
*
|
|
70
|
+
* Prefer {@link RouteGuardFactory.createGuardFromTokenSources} or
|
|
71
|
+
* {@link RouteGuardFactory.createGuardFromAuthHeader} unless you have already
|
|
72
|
+
* decoded and trust the user yourself.
|
|
73
|
+
*
|
|
74
|
+
* @param type - Which guard to build: `"authenticated"` or `"admin"`.
|
|
75
|
+
* @param opts - The resolved check options (notably the decoded `user`).
|
|
76
|
+
* @returns The constructed {@link IRouteGuard}.
|
|
77
|
+
* @throws {Error} If `type` is not a recognized guard type.
|
|
78
|
+
*/
|
|
21
79
|
static createGuardFromOptions(type: RouteGuardType, opts: InitRouteGuardCheckOptions): IRouteGuard;
|
|
80
|
+
/**
|
|
81
|
+
* Instance-level convenience wrapper around the static
|
|
82
|
+
* {@link RouteGuardFactory.createGuardFromOptions}.
|
|
83
|
+
*
|
|
84
|
+
* @param type - Which guard to build: `"authenticated"` or `"admin"`.
|
|
85
|
+
* @param opts - The resolved check options (notably the decoded `user`).
|
|
86
|
+
* @returns The constructed {@link IRouteGuard}.
|
|
87
|
+
* @throws {Error} If `type` is not a recognized guard type.
|
|
88
|
+
*/
|
|
22
89
|
createGuardFromOptions(type: RouteGuardType, opts: InitRouteGuardCheckOptions): IRouteGuard;
|
|
90
|
+
/**
|
|
91
|
+
* Verify one or more raw tokens and, on success, construct the requested
|
|
92
|
+
* guard for the decoded user.
|
|
93
|
+
*
|
|
94
|
+
* Each entry in `token_sources` is a candidate token (e.g. an access token
|
|
95
|
+
* pulled from a header or cookie); they are decoded/verified via the
|
|
96
|
+
* configured JWT key manager and the first valid one resolves the user.
|
|
97
|
+
*
|
|
98
|
+
* @param type - Which guard to build: `"authenticated"` or `"admin"`.
|
|
99
|
+
* @param token_sources - Candidate tokens to verify. Pass the **raw token
|
|
100
|
+
* strings only** — do not include a `"Bearer "` prefix here (see
|
|
101
|
+
* {@link RouteGuardFactory.createGuardFromAuthHeader} if you have a full
|
|
102
|
+
* `Authorization` header).
|
|
103
|
+
* @param jwt_audience - The expected JWT audience (`aud`), i.e. the
|
|
104
|
+
* {@link ApiServerId} of the resource server the token must be scoped to.
|
|
105
|
+
* @returns The constructed {@link IRouteGuard}.
|
|
106
|
+
* @throws {TypeError} If `jwt_audience` is not a valid API server ID.
|
|
107
|
+
* @throws {Error} If no JWT key manager is available, or none of the tokens
|
|
108
|
+
* verify successfully.
|
|
109
|
+
*/
|
|
23
110
|
createGuardFromTokenSources(type: RouteGuardType, token_sources: readonly PotentiallyValidTokenSource[], jwt_audience: ApiServerId): Promise<IRouteGuard>;
|
|
111
|
+
/**
|
|
112
|
+
* Parse a raw HTTP `Authorization` header, verify the bearer token it
|
|
113
|
+
* carries, and construct the requested guard for the decoded user.
|
|
114
|
+
*
|
|
115
|
+
* @param type - Which guard to build: `"authenticated"` or `"admin"`.
|
|
116
|
+
* @param authHeader - The **full `Authorization` header value, including the
|
|
117
|
+
* `"Bearer "` prefix** — e.g. `"Bearer eyJhbGci..."`, exactly as read from
|
|
118
|
+
* `request.headers.get("authorization")`. The prefix is stripped
|
|
119
|
+
* internally before the token is verified; passing a bare token (without
|
|
120
|
+
* the prefix) will throw. `null` is accepted (and rejected) so callers can
|
|
121
|
+
* forward a missing header directly.
|
|
122
|
+
* @param jwt_audience - The expected JWT audience (`aud`), i.e. the
|
|
123
|
+
* {@link ApiServerId} of the resource server the token must be scoped to.
|
|
124
|
+
* @returns The constructed {@link IRouteGuard}.
|
|
125
|
+
* @throws {Error} If `authHeader` is missing/empty or does not start with the
|
|
126
|
+
* `"Bearer "` prefix.
|
|
127
|
+
* @throws {Error} If the extracted token fails verification (propagated from
|
|
128
|
+
* {@link RouteGuardFactory.createGuardFromTokenSources}).
|
|
129
|
+
*
|
|
130
|
+
* @example
|
|
131
|
+
* ```ts
|
|
132
|
+
* const guard = await factory.createGuardFromAuthHeader(
|
|
133
|
+
* "authenticated",
|
|
134
|
+
* request.headers.get("authorization"), // "Bearer eyJ..."
|
|
135
|
+
* "my-api-server-id",
|
|
136
|
+
* );
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
24
139
|
createGuardFromAuthHeader(type: RouteGuardType, authHeader: string | null, jwt_audience: string): Promise<IRouteGuard>;
|
|
25
140
|
}
|
|
26
141
|
export default RouteGuardFactory;
|
|
@@ -17,6 +17,24 @@ const GUARDS = {
|
|
|
17
17
|
authenticated: (opts) => new AuthenticationRequiredRouteGuard(opts),
|
|
18
18
|
admin: (opts) => new AdminRequiredRouteGuard(opts),
|
|
19
19
|
};
|
|
20
|
+
/**
|
|
21
|
+
* Factory for constructing {@link IRouteGuard} instances that protect API
|
|
22
|
+
* routes and server components.
|
|
23
|
+
*
|
|
24
|
+
* A guard verifies the caller's identity (and, depending on the guard type,
|
|
25
|
+
* their privileges) before a protected handler runs. The factory exposes
|
|
26
|
+
* several entry points depending on what you already have in hand:
|
|
27
|
+
*
|
|
28
|
+
* - {@link RouteGuardFactory.createGuardFromOptions} — you already have a
|
|
29
|
+
* decoded user (no token verification performed).
|
|
30
|
+
* - {@link RouteGuardFactory.createGuardFromTokenSources} — you have one or
|
|
31
|
+
* more raw tokens to verify.
|
|
32
|
+
* - {@link RouteGuardFactory.createGuardFromAuthHeader} — you have a raw HTTP
|
|
33
|
+
* `Authorization` header value to parse and verify.
|
|
34
|
+
*
|
|
35
|
+
* Guard types currently supported: `"authenticated"` (any signed-in user) and
|
|
36
|
+
* `"admin"` (signed-in users with admin privileges).
|
|
37
|
+
*/
|
|
20
38
|
export class RouteGuardFactory {
|
|
21
39
|
jwt_keys_manager;
|
|
22
40
|
environment;
|
|
@@ -54,6 +72,19 @@ export class RouteGuardFactory {
|
|
|
54
72
|
return false;
|
|
55
73
|
return validGuardTypeSchema.safeParse(type).success;
|
|
56
74
|
}
|
|
75
|
+
/**
|
|
76
|
+
* Construct a guard directly from an already-resolved user/options object,
|
|
77
|
+
* without performing any token verification.
|
|
78
|
+
*
|
|
79
|
+
* Prefer {@link RouteGuardFactory.createGuardFromTokenSources} or
|
|
80
|
+
* {@link RouteGuardFactory.createGuardFromAuthHeader} unless you have already
|
|
81
|
+
* decoded and trust the user yourself.
|
|
82
|
+
*
|
|
83
|
+
* @param type - Which guard to build: `"authenticated"` or `"admin"`.
|
|
84
|
+
* @param opts - The resolved check options (notably the decoded `user`).
|
|
85
|
+
* @returns The constructed {@link IRouteGuard}.
|
|
86
|
+
* @throws {Error} If `type` is not a recognized guard type.
|
|
87
|
+
*/
|
|
57
88
|
static createGuardFromOptions(type, opts) {
|
|
58
89
|
if (!RouteGuardFactory.isValidRouteGuardType(type)) {
|
|
59
90
|
throw new Error(`Invalid route guard type, should be one of: ${GUARD_TYPES.join(", ")}`);
|
|
@@ -62,9 +93,38 @@ export class RouteGuardFactory {
|
|
|
62
93
|
const GUARD = GUARD_LOADER(opts);
|
|
63
94
|
return GUARD;
|
|
64
95
|
}
|
|
96
|
+
/**
|
|
97
|
+
* Instance-level convenience wrapper around the static
|
|
98
|
+
* {@link RouteGuardFactory.createGuardFromOptions}.
|
|
99
|
+
*
|
|
100
|
+
* @param type - Which guard to build: `"authenticated"` or `"admin"`.
|
|
101
|
+
* @param opts - The resolved check options (notably the decoded `user`).
|
|
102
|
+
* @returns The constructed {@link IRouteGuard}.
|
|
103
|
+
* @throws {Error} If `type` is not a recognized guard type.
|
|
104
|
+
*/
|
|
65
105
|
createGuardFromOptions(type, opts) {
|
|
66
106
|
return RouteGuardFactory.createGuardFromOptions(type, opts);
|
|
67
107
|
}
|
|
108
|
+
/**
|
|
109
|
+
* Verify one or more raw tokens and, on success, construct the requested
|
|
110
|
+
* guard for the decoded user.
|
|
111
|
+
*
|
|
112
|
+
* Each entry in `token_sources` is a candidate token (e.g. an access token
|
|
113
|
+
* pulled from a header or cookie); they are decoded/verified via the
|
|
114
|
+
* configured JWT key manager and the first valid one resolves the user.
|
|
115
|
+
*
|
|
116
|
+
* @param type - Which guard to build: `"authenticated"` or `"admin"`.
|
|
117
|
+
* @param token_sources - Candidate tokens to verify. Pass the **raw token
|
|
118
|
+
* strings only** — do not include a `"Bearer "` prefix here (see
|
|
119
|
+
* {@link RouteGuardFactory.createGuardFromAuthHeader} if you have a full
|
|
120
|
+
* `Authorization` header).
|
|
121
|
+
* @param jwt_audience - The expected JWT audience (`aud`), i.e. the
|
|
122
|
+
* {@link ApiServerId} of the resource server the token must be scoped to.
|
|
123
|
+
* @returns The constructed {@link IRouteGuard}.
|
|
124
|
+
* @throws {TypeError} If `jwt_audience` is not a valid API server ID.
|
|
125
|
+
* @throws {Error} If no JWT key manager is available, or none of the tokens
|
|
126
|
+
* verify successfully.
|
|
127
|
+
*/
|
|
68
128
|
async createGuardFromTokenSources(type, token_sources, jwt_audience) {
|
|
69
129
|
if (this.debug) {
|
|
70
130
|
console.log(`[RouteGuardFactory] Initializing route guard from token sources: `, token_sources);
|
|
@@ -85,6 +145,34 @@ export class RouteGuardFactory {
|
|
|
85
145
|
}
|
|
86
146
|
return this.createGuardFromOptions(type, init_opts);
|
|
87
147
|
}
|
|
148
|
+
/**
|
|
149
|
+
* Parse a raw HTTP `Authorization` header, verify the bearer token it
|
|
150
|
+
* carries, and construct the requested guard for the decoded user.
|
|
151
|
+
*
|
|
152
|
+
* @param type - Which guard to build: `"authenticated"` or `"admin"`.
|
|
153
|
+
* @param authHeader - The **full `Authorization` header value, including the
|
|
154
|
+
* `"Bearer "` prefix** — e.g. `"Bearer eyJhbGci..."`, exactly as read from
|
|
155
|
+
* `request.headers.get("authorization")`. The prefix is stripped
|
|
156
|
+
* internally before the token is verified; passing a bare token (without
|
|
157
|
+
* the prefix) will throw. `null` is accepted (and rejected) so callers can
|
|
158
|
+
* forward a missing header directly.
|
|
159
|
+
* @param jwt_audience - The expected JWT audience (`aud`), i.e. the
|
|
160
|
+
* {@link ApiServerId} of the resource server the token must be scoped to.
|
|
161
|
+
* @returns The constructed {@link IRouteGuard}.
|
|
162
|
+
* @throws {Error} If `authHeader` is missing/empty or does not start with the
|
|
163
|
+
* `"Bearer "` prefix.
|
|
164
|
+
* @throws {Error} If the extracted token fails verification (propagated from
|
|
165
|
+
* {@link RouteGuardFactory.createGuardFromTokenSources}).
|
|
166
|
+
*
|
|
167
|
+
* @example
|
|
168
|
+
* ```ts
|
|
169
|
+
* const guard = await factory.createGuardFromAuthHeader(
|
|
170
|
+
* "authenticated",
|
|
171
|
+
* request.headers.get("authorization"), // "Bearer eyJ..."
|
|
172
|
+
* "my-api-server-id",
|
|
173
|
+
* );
|
|
174
|
+
* ```
|
|
175
|
+
*/
|
|
88
176
|
async createGuardFromAuthHeader(type, authHeader, jwt_audience) {
|
|
89
177
|
if (!authHeader || typeof authHeader !== "string") {
|
|
90
178
|
throw new Error("No auth header found");
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"route-guard-factory.js","sourceRoot":"","sources":["../../src/route_guards/route-guard-factory.ts"],"names":[],"mappings":"AAAA,yBAAyB;AAEzB,OAAO,uBAAuB,MAAM,SAAS,CAAC;AAC9C,OAAO,gCAAgC,MAAM,iBAAiB,CAAC;AAE/D,OAAO,EAAE,CAAC,EAAE,MAAM,KAAK,CAAC;AAGxB,OAAO,EAEL,iBAAiB,EACjB,iBAAiB,GAElB,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAE,mBAAmB,EAAuB,MAAM,iBAAiB,CAAC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E,SAAS,CAAuB,CAAC;IAC5E,CAAC;IAED;;;;;;;;;;;;;;;;;;;;;;;;;;;OA2BG;IACI,KAAK,CAAC,yBAAyB,CACpC,IAAoB,EACpB,UAAyB,EACzB,YAAoB;QAEpB,IAAI,CAAC,UAAU,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;YAClD,MAAM,IAAI,KAAK,CAAC,sBAAsB,CAAC,CAAC;QAC1C,CAAC;QACD,MAAM,YAAY,GAAG,SAAkB,CAAC;QACxC,IAAI,CAAC,UAAU,CAAC,UAAU,CAAC,YAAY,CAAC,EAAE,CAAC;YACzC,MAAM,IAAI,KAAK,CAAC,2CAA2C,CAAC,CAAC;QAC/D,CAAC;QACD,MAAM,KAAK,GAAW,UAAU,CAAC,KAAK,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;QAE5D,OAAO,MAAM,IAAI,CAAC,2BAA2B,CAC3C,IAAI,EACJ;YACE;gBACE,UAAU,EAAE,0BAA0B;gBACtC,KAAK;gBACL,IAAI,EAAE,QAAQ;aACf;SACF,EACD,YAAY,CACb,CAAC;IACJ,CAAC;CACF;AAED,eAAe,iBAAiB,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@schemavaults/auth-server-sdk",
|
|
3
3
|
"description": "TypeScript SDK for building authenticated endpoints/middlewares for the Auth Server and Resource Servers",
|
|
4
|
-
"version": "0.22.
|
|
4
|
+
"version": "0.22.81",
|
|
5
5
|
"license": "UNLICENSED",
|
|
6
6
|
"private": false,
|
|
7
7
|
"repository": {
|
|
@@ -18,8 +18,8 @@
|
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
20
|
"zod": "3.25.8",
|
|
21
|
-
"@schemavaults/jwt": "0.7.
|
|
22
|
-
"@schemavaults/auth-common": "0.13.
|
|
21
|
+
"@schemavaults/jwt": "0.7.32",
|
|
22
|
+
"@schemavaults/auth-common": "0.13.1",
|
|
23
23
|
"@schemavaults/app-definitions": "0.7.1"
|
|
24
24
|
},
|
|
25
25
|
"scripts": {
|