@jskit-ai/auth-web 0.1.155 → 0.1.157
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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@jskit-ai/auth-web",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.157",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"test": "node --test"
|
|
@@ -20,10 +20,10 @@
|
|
|
20
20
|
"./test/playwright": "./src/test/playwright.js"
|
|
21
21
|
},
|
|
22
22
|
"dependencies": {
|
|
23
|
-
"@jskit-ai/auth-core": "0.1.
|
|
24
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
25
|
-
"@jskit-ai/kernel": "0.1.
|
|
26
|
-
"@jskit-ai/shell-web": "0.1.
|
|
23
|
+
"@jskit-ai/auth-core": "0.1.155",
|
|
24
|
+
"@jskit-ai/http-runtime": "0.1.155",
|
|
25
|
+
"@jskit-ai/kernel": "0.1.157",
|
|
26
|
+
"@jskit-ai/shell-web": "0.1.161",
|
|
27
27
|
"@mdi/js": "^7.4.47"
|
|
28
28
|
},
|
|
29
29
|
"peerDependencies": {
|
|
@@ -300,10 +300,10 @@
|
|
|
300
300
|
"dependencies": {
|
|
301
301
|
"runtime": {
|
|
302
302
|
"@mdi/js": "^7.4.47",
|
|
303
|
-
"@jskit-ai/auth-core": "0.1.
|
|
304
|
-
"@jskit-ai/http-runtime": "0.1.
|
|
305
|
-
"@jskit-ai/kernel": "0.1.
|
|
306
|
-
"@jskit-ai/shell-web": "0.1.
|
|
303
|
+
"@jskit-ai/auth-core": "0.1.155",
|
|
304
|
+
"@jskit-ai/http-runtime": "0.1.155",
|
|
305
|
+
"@jskit-ai/kernel": "0.1.157",
|
|
306
|
+
"@jskit-ai/shell-web": "0.1.161"
|
|
307
307
|
},
|
|
308
308
|
"dev": {}
|
|
309
309
|
},
|
|
@@ -4,8 +4,6 @@ import { buildRoutes } from "../routes/authRoutes.js";
|
|
|
4
4
|
class AuthRouteServiceProvider {
|
|
5
5
|
static id = "auth.routes";
|
|
6
6
|
|
|
7
|
-
static dependsOn = ["auth.web"];
|
|
8
|
-
|
|
9
7
|
register(app) {
|
|
10
8
|
if (!app || typeof app.has !== "function") {
|
|
11
9
|
throw new Error("AuthRouteServiceProvider requires application has().");
|
|
@@ -14,7 +14,7 @@ function resolveDevAuthBootstrapEnabled(scope) {
|
|
|
14
14
|
class AuthWebServiceProvider {
|
|
15
15
|
static id = "auth.web";
|
|
16
16
|
|
|
17
|
-
static
|
|
17
|
+
static startsAfter = ["runtime.actions"];
|
|
18
18
|
|
|
19
19
|
register(app) {
|
|
20
20
|
if (!app || typeof app.singleton !== "function" || typeof app.has !== "function") {
|
|
@@ -43,6 +43,10 @@ function createReplyStub() {
|
|
|
43
43
|
};
|
|
44
44
|
}
|
|
45
45
|
|
|
46
|
+
class MockActionRuntimeProvider {
|
|
47
|
+
static id = "runtime.actions";
|
|
48
|
+
}
|
|
49
|
+
|
|
46
50
|
test("auth route provider registers routes and executes login/logout handlers", async () => {
|
|
47
51
|
const events = [];
|
|
48
52
|
const fastify = createFastifyStub();
|
|
@@ -96,7 +100,7 @@ test("auth route provider registers routes and executes login/logout handlers",
|
|
|
96
100
|
static id = "auth.provider";
|
|
97
101
|
}
|
|
98
102
|
|
|
99
|
-
await app.start({ providers: [MockAuthProvider, AuthWebServiceProvider, AuthRouteServiceProvider] });
|
|
103
|
+
await app.start({ providers: [MockActionRuntimeProvider, MockAuthProvider, AuthWebServiceProvider, AuthRouteServiceProvider] });
|
|
100
104
|
|
|
101
105
|
const registration = httpRuntime.registerRoutes();
|
|
102
106
|
assert.equal(registration.routeCount > 0, true);
|
|
@@ -165,7 +169,7 @@ test("auth route provider registers dev login route only when dev auth bypass is
|
|
|
165
169
|
static id = "auth.provider";
|
|
166
170
|
}
|
|
167
171
|
|
|
168
|
-
await app.start({ providers: [MockAuthProvider, AuthWebServiceProvider, AuthRouteServiceProvider] });
|
|
172
|
+
await app.start({ providers: [MockActionRuntimeProvider, MockAuthProvider, AuthWebServiceProvider, AuthRouteServiceProvider] });
|
|
169
173
|
|
|
170
174
|
const registration = httpRuntime.registerRoutes();
|
|
171
175
|
assert.equal(registration.routeCount > 0, true);
|
|
@@ -212,7 +216,7 @@ test("auth route provider does not resolve authService during boot", async () =>
|
|
|
212
216
|
static id = "auth.provider";
|
|
213
217
|
}
|
|
214
218
|
|
|
215
|
-
await app.start({ providers: [MockAuthProvider, AuthWebServiceProvider, AuthRouteServiceProvider] });
|
|
219
|
+
await app.start({ providers: [MockActionRuntimeProvider, MockAuthProvider, AuthWebServiceProvider, AuthRouteServiceProvider] });
|
|
216
220
|
assert.equal(authServiceResolutions, 0);
|
|
217
221
|
|
|
218
222
|
const registration = httpRuntime.registerRoutes();
|
|
@@ -290,7 +294,7 @@ test("auth session route preserves provider capabilities through response valida
|
|
|
290
294
|
static id = "auth.provider";
|
|
291
295
|
}
|
|
292
296
|
|
|
293
|
-
await app.start({ providers: [MockAuthProvider, AuthWebServiceProvider, AuthRouteServiceProvider] });
|
|
297
|
+
await app.start({ providers: [MockActionRuntimeProvider, MockAuthProvider, AuthWebServiceProvider, AuthRouteServiceProvider] });
|
|
294
298
|
|
|
295
299
|
const registration = httpRuntime.registerRoutes();
|
|
296
300
|
assert.equal(registration.routeCount > 0, true);
|
|
@@ -347,7 +351,7 @@ test("auth session route exposes denial reason when policy clears a rejected aut
|
|
|
347
351
|
static id = "auth.provider";
|
|
348
352
|
}
|
|
349
353
|
|
|
350
|
-
await app.start({ providers: [MockAuthProvider, AuthWebServiceProvider, AuthRouteServiceProvider] });
|
|
354
|
+
await app.start({ providers: [MockActionRuntimeProvider, MockAuthProvider, AuthWebServiceProvider, AuthRouteServiceProvider] });
|
|
351
355
|
|
|
352
356
|
const registration = httpRuntime.registerRoutes();
|
|
353
357
|
assert.equal(registration.routeCount > 0, true);
|