@idp.global/interfaces 13.0.0 → 13.1.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,12 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-07-16 - 13.1.0
4
+
5
+ ### Features
6
+
7
+ - add `data.ILoginSession.data.transferTargetHash` so an outstanding transfer token, its expiry, and its canonical authorized target binding can be persisted and cleared atomically without storing a raw target URL
8
+ - document and test that `IReq_ExchangeRefreshTokenAndTransferToken` requires `transferTarget` for both transfer-token issue and consume requests
9
+
3
10
  ## 2026-07-16 - 13.0.0
4
11
 
5
12
  ### Breaking Changes
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '13.0.0',
6
+ version: '13.1.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=
@@ -6,8 +6,28 @@ export interface ILoginSession {
6
6
  invalidated: boolean;
7
7
  refreshTokenHash?: string | null;
8
8
  rotatedRefreshTokenHashes?: string[];
9
+ /**
10
+ * Hash of the single outstanding opaque transfer token.
11
+ *
12
+ * This field, `transferTokenExpiresAt`, and `transferTargetHash` describe
13
+ * one transfer grant and must be set, replaced, and cleared together in a
14
+ * single atomic persistence operation.
15
+ */
9
16
  transferTokenHash?: string | null;
17
+ /**
18
+ * Absolute expiry time, in Unix epoch milliseconds, for the outstanding
19
+ * transfer grant.
20
+ */
10
21
  transferTokenExpiresAt?: number | null;
22
+ /**
23
+ * Server-derived binding hash of the canonical, authorized
24
+ * `ITransferTarget.appUrl` for the outstanding transfer grant.
25
+ *
26
+ * Implementations must never persist the raw target URL in login-session
27
+ * data. This field must be set, replaced, and cleared atomically with
28
+ * `transferTokenHash` and `transferTokenExpiresAt`.
29
+ */
30
+ transferTargetHash?: string | null;
11
31
  /**
12
32
  * a device id that can be used to share the login session
13
33
  * in different contexts on the same device
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idp.global/interfaces",
3
- "version": "13.0.0",
3
+ "version": "13.1.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
@@ -53,8 +53,12 @@ const organization: data.IOrganization = {
53
53
  ```
54
54
 
55
55
  Persisted `data.IJwt` and `data.ILoginSession` shapes never contain plaintext
56
- refresh tokens. Session persistence exposes only refresh-token hashes and
57
- rotation history; opaque refresh tokens remain limited to the request and
56
+ refresh or transfer tokens. Session persistence exposes only refresh-token
57
+ hashes, refresh-token rotation history, and the atomic transfer-grant tuple
58
+ `transferTokenHash`, `transferTokenExpiresAt`, and `transferTargetHash`.
59
+ The target hash is derived server-side from the canonical, authorized
60
+ `ITransferTarget.appUrl`; the raw target URL is never persisted in session
61
+ data. Opaque tokens and the transfer target remain limited to the request and
58
62
  response contracts that transport them.
59
63
 
60
64
  ## TypedRequest Contracts
@@ -86,6 +90,11 @@ const transferRequest: request.IReq_ExchangeRefreshTokenAndTransferToken['reques
86
90
  };
87
91
  ```
88
92
 
93
+ `transferTarget` is required both when a refresh token issues a transfer token
94
+ and when a transfer token is consumed. The server authorizes and canonicalizes
95
+ the target before binding its server-derived hash to the outstanding transfer
96
+ token.
97
+
89
98
  Request groups cover login, registration, JWT refresh, user/session queries, organization membership, invitations, apps, billing, admin actions, alerts, passport device flows, password reset, device IDs, and OIDC authorization.
90
99
 
91
100
  OIDC app contracts expose only client configuration and safe credential
@@ -3,6 +3,6 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '13.0.0',
6
+ version: '13.1.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  }
@@ -6,8 +6,28 @@ export interface ILoginSession {
6
6
  invalidated: boolean;
7
7
  refreshTokenHash?: string | null;
8
8
  rotatedRefreshTokenHashes?: string[];
9
+ /**
10
+ * Hash of the single outstanding opaque transfer token.
11
+ *
12
+ * This field, `transferTokenExpiresAt`, and `transferTargetHash` describe
13
+ * one transfer grant and must be set, replaced, and cleared together in a
14
+ * single atomic persistence operation.
15
+ */
9
16
  transferTokenHash?: string | null;
17
+ /**
18
+ * Absolute expiry time, in Unix epoch milliseconds, for the outstanding
19
+ * transfer grant.
20
+ */
10
21
  transferTokenExpiresAt?: number | null;
22
+ /**
23
+ * Server-derived binding hash of the canonical, authorized
24
+ * `ITransferTarget.appUrl` for the outstanding transfer grant.
25
+ *
26
+ * Implementations must never persist the raw target URL in login-session
27
+ * data. This field must be set, replaced, and cleared atomically with
28
+ * `transferTokenHash` and `transferTokenExpiresAt`.
29
+ */
30
+ transferTargetHash?: string | null;
11
31
  /**
12
32
  * a device id that can be used to share the login session
13
33
  * in different contexts on the same device
package/ts/readme.md CHANGED
@@ -117,10 +117,14 @@ type TGetValidationKeys = request.IReq_GetPublicKeysForValidation;
117
117
  type TPushValidationKeys = request.IReq_PushPublicKeysForValidation;
118
118
  ```
119
119
 
120
- Persisted JWT and login-session data contracts contain no plaintext refresh
121
- tokens. Transfer-token exchange uses the minimal `data.ITransferTarget`
122
- contract with an `appUrl`; it does not expose the removed flat legacy app
123
- shape.
120
+ Persisted JWT and login-session data contracts contain no plaintext refresh or
121
+ transfer tokens. Transfer-token exchange requires the minimal
122
+ `data.ITransferTarget` contract with an `appUrl` for both issue and consume; it
123
+ does not expose the removed flat legacy app shape. A session persists only the
124
+ atomic `transferTokenHash`, `transferTokenExpiresAt`, and `transferTargetHash`
125
+ tuple for an outstanding transfer grant. The target hash is derived
126
+ server-side from the canonical, authorized URL, and the raw URL is never
127
+ persisted in session data.
124
128
 
125
129
  Public app contracts contain client type, callback and post-logout URIs,
126
130
  allowed scopes, grant types, and bounded token lifetime settings. Secret hashes,