@cosmicdrift/kumiko-server-runtime 1.0.0 → 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.
@@ -2,28 +2,16 @@
2
2
  * runProdApp session-wiring decision (extracted pure so it is testable without a
3
3
  * full prod boot).
4
4
  *
5
- * Secure-by-default: mounting the `sessions` feature turns server-side session
6
- * revocation ON automatically there is no separate opt-in. The
7
- * `auth.sessions` option only overrides the config, and `auth.sessions: false` is the
8
- * explicit opt-out (back to stateless JWTs).
5
+ * Secure-by-default (#1372): mounting a sessionStore provider (sessions feature)
6
+ * turns server-side session revocation ON automatically. There is no
7
+ * `auth.sessions` opt-in/opt-out mount sessions for revocable JWTs, omit it
8
+ * for intentional stateless JWTs (boot-gate warns / aborts unless acknowledged
9
+ * via a future flag if needed; today auth without sessions fails the gate).
9
10
  */
10
11
 
11
- export type ProdSessionsConfig = { readonly expiresInMs?: number };
12
-
13
- /** Config object to override defaults, or `false` to disable session wiring entirely. */
14
- export type ProdSessionsOption = ProdSessionsConfig | false;
15
-
16
12
  export function shouldWireProdSessions(
17
13
  hasAuth: boolean,
18
- sessionsFeatureMounted: boolean,
19
- sessionsOption: ProdSessionsOption | undefined,
14
+ sessionStoreProviderMounted: boolean,
20
15
  ): boolean {
21
- return hasAuth && sessionsFeatureMounted && sessionsOption !== false;
22
- }
23
-
24
- /** The config passed to buildProdSessionAuth — `false`/absent collapse to defaults. */
25
- export function resolveProdSessionsConfig(
26
- sessionsOption: ProdSessionsOption | undefined,
27
- ): ProdSessionsConfig {
28
- return sessionsOption || {};
16
+ return hasAuth && sessionStoreProviderMounted;
29
17
  }