@idp.global/interfaces 16.0.0 → 17.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/changelog.md CHANGED
@@ -1,5 +1,15 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-07-18 - 17.0.0
4
+
5
+ ### Breaking Changes
6
+
7
+ - require closed primary/MFA authentication evidence on every persisted login session so privileged freshness decisions cannot be inferred from refresh activity or mutable credential telemetry
8
+ - require authentication evidence on persisted login sessions (loginsession)
9
+ - Add closed primary and MFA authentication evidence types for login sessions.
10
+ - Require every persisted login session to include server-derived authentication evidence.
11
+ - Document that refresh operations must not advance authentication timestamps.
12
+
3
13
  ## 2026-07-18 - 16.0.0
4
14
 
5
15
  ### Breaking Changes
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '16.0.0',
6
+ version: '17.0.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  };
9
9
  //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLFFBQVE7SUFDakIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
@@ -1,9 +1,23 @@
1
+ export type TLoginSessionPrimaryAuthenticationMethod = 'magic_link' | 'passkey' | 'password' | 'saml';
2
+ export type TLoginSessionMfaFactor = 'backup_code' | 'passkey' | 'totp';
3
+ export interface ILoginSessionAuthenticationEvidence {
4
+ primaryMethod: TLoginSessionPrimaryAuthenticationMethod;
5
+ primaryAuthenticatedAt: number;
6
+ mfaFactor: TLoginSessionMfaFactor | null;
7
+ mfaAuthenticatedAt: number | null;
8
+ }
1
9
  export interface ILoginSession {
2
10
  id: string;
3
11
  data: {
4
12
  userId: string;
5
13
  validUntil: number;
6
14
  invalidated: boolean;
15
+ /**
16
+ * Closed, server-derived authentication evidence used for freshness and
17
+ * privileged step-up decisions. Refreshing a session must not advance
18
+ * either authentication timestamp.
19
+ */
20
+ authentication: ILoginSessionAuthenticationEvidence;
7
21
  refreshTokenHash?: string | null;
8
22
  rotatedRefreshTokenHashes?: string[] | null;
9
23
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idp.global/interfaces",
3
- "version": "16.0.0",
3
+ "version": "17.0.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.",
6
6
  "exports": {
package/readme.md CHANGED
@@ -56,6 +56,8 @@ Persisted `data.IJwt` and `data.ILoginSession` shapes never contain plaintext
56
56
  refresh or transfer tokens. Session persistence exposes only refresh-token
57
57
  hashes, refresh-token rotation history, and the atomic transfer-grant tuple
58
58
  `transferTokenHash`, `transferTokenExpiresAt`, and `transferTargetHash`.
59
+ Every login session also requires closed server-derived primary and MFA
60
+ authentication evidence; refresh operations must not advance those timestamps.
59
61
  The target hash is derived server-side from the canonical, authorized
60
62
  `ITransferTarget.appUrl`; the raw target URL is never persisted in session
61
63
  data. Opaque tokens and the transfer target remain limited to the request and
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '16.0.0',
6
+ version: '17.0.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  }
@@ -1,9 +1,30 @@
1
+ export type TLoginSessionPrimaryAuthenticationMethod =
2
+ | 'magic_link'
3
+ | 'passkey'
4
+ | 'password'
5
+ | 'saml';
6
+
7
+ export type TLoginSessionMfaFactor = 'backup_code' | 'passkey' | 'totp';
8
+
9
+ export interface ILoginSessionAuthenticationEvidence {
10
+ primaryMethod: TLoginSessionPrimaryAuthenticationMethod;
11
+ primaryAuthenticatedAt: number;
12
+ mfaFactor: TLoginSessionMfaFactor | null;
13
+ mfaAuthenticatedAt: number | null;
14
+ }
15
+
1
16
  export interface ILoginSession {
2
17
  id: string;
3
18
  data: {
4
19
  userId: string;
5
20
  validUntil: number;
6
21
  invalidated: boolean;
22
+ /**
23
+ * Closed, server-derived authentication evidence used for freshness and
24
+ * privileged step-up decisions. Refreshing a session must not advance
25
+ * either authentication timestamp.
26
+ */
27
+ authentication: ILoginSessionAuthenticationEvidence;
7
28
  refreshTokenHash?: string | null;
8
29
  rotatedRefreshTokenHashes?: string[] | null;
9
30
  /**