@vc-shell/framework 2.6.1 → 2.6.2-pr375.0f04f78

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.
@@ -0,0 +1,17 @@
1
+ import type { ComputedRef } from "vue";
2
+ import type { RouteLocationNormalized, RouteLocationRaw } from "vue-router";
3
+ interface UserManagement {
4
+ isAuthenticated: ComputedRef<boolean>;
5
+ loadUser: () => Promise<unknown>;
6
+ }
7
+ /**
8
+ * Sends an unauthenticated visitor of the app's root routes to the login page.
9
+ *
10
+ * "No user held" is not "not signed in": `loadUser()` swallows its errors, so one 5xx or dropped
11
+ * connection while the app starts leaves no user behind a live session cookie. The user is loaded
12
+ * once more before deciding — deduplicated with a load already in flight — and only a visitor the
13
+ * server still does not know is sent to log in.
14
+ */
15
+ export declare function requireAuthentication(to: RouteLocationNormalized, { isAuthenticated, loadUser }: UserManagement): Promise<RouteLocationRaw | undefined>;
16
+ export {};
17
+ //# sourceMappingURL=authGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"authGuard.d.ts","sourceRoot":"","sources":["../../../core/utilities/authGuard.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,KAAK,CAAC;AACvC,OAAO,KAAK,EAAE,uBAAuB,EAAE,gBAAgB,EAAE,MAAM,YAAY,CAAC;AAE5E,UAAU,cAAc;IACtB,eAAe,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IACtC,QAAQ,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CAClC;AAED;;;;;;;GAOG;AACH,wBAAsB,qBAAqB,CACzC,EAAE,EAAE,uBAAuB,EAC3B,EAAE,eAAe,EAAE,QAAQ,EAAE,EAAE,cAAc,GAC5C,OAAO,CAAC,gBAAgB,GAAG,SAAS,CAAC,CAYvC"}