@idp.global/interfaces 12.0.0 → 13.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 +9 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/app.d.ts +2 -13
- package/dist_ts/data/jwt.d.ts +0 -4
- package/dist_ts/data/loginsession.d.ts +0 -4
- package/dist_ts/request/jwt.d.ts +9 -11
- package/dist_ts/request/login.d.ts +1 -1
- package/package.json +1 -1
- package/readme.md +19 -0
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/app.ts +2 -13
- package/ts/data/jwt.ts +0 -5
- package/ts/data/loginsession.ts +0 -4
- package/ts/readme.md +8 -1
- package/ts/request/jwt.ts +11 -13
- package/ts/request/login.ts +1 -1
package/changelog.md
CHANGED
|
@@ -1,5 +1,14 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-07-16 - 13.0.0
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- remove persisted plaintext `refreshToken` fields from `data.IJwt` and `data.ILoginSession`; login-session persistence exposes hashed refresh-token state only
|
|
8
|
+
- remove the compatibility-only `data.IAppLegacy` shape and replace the transfer exchange request's `appData` field with `transferTarget: data.ITransferTarget`, containing only `appUrl`
|
|
9
|
+
- replace `IReq_GetPublicKeyForValidation` and `IReq_PushPublicKeyForValidation` with plural `IReq_GetPublicKeysForValidation` and `IReq_PushPublicKeysForValidation` contracts using the `getPublicKeysForValidation` and `pushPublicKeysForValidation` methods
|
|
10
|
+
- remove the singular top-level `publicKeyPem` payload from validation-key requests and responses; callers receive and push only the complete `publicKeys` keyset
|
|
11
|
+
|
|
3
12
|
## 2026-07-16 - 12.0.0
|
|
4
13
|
|
|
5
14
|
### Breaking Changes
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@idp.global/interfaces',
|
|
6
|
-
version: '
|
|
6
|
+
version: '13.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=
|
package/dist_ts/data/app.d.ts
CHANGED
|
@@ -66,20 +66,9 @@ export interface ICustomOidcApp {
|
|
|
66
66
|
}
|
|
67
67
|
export type IApp = IGlobalApp | IPartnerApp | ICustomOidcApp;
|
|
68
68
|
/**
|
|
69
|
-
*
|
|
70
|
-
* that expects a flat app structure (e.g., idpclient, transfermanager)
|
|
69
|
+
* Browser destination used by the refresh/transfer-token exchange flow.
|
|
71
70
|
*/
|
|
72
|
-
export interface
|
|
73
|
-
/**
|
|
74
|
-
* must be unique
|
|
75
|
-
*/
|
|
76
|
-
id: string;
|
|
77
|
-
/**
|
|
78
|
-
* should be unique
|
|
79
|
-
*/
|
|
80
|
-
name: string;
|
|
81
|
-
description: string;
|
|
82
|
-
logoUrl: string;
|
|
71
|
+
export interface ITransferTarget {
|
|
83
72
|
appUrl: string;
|
|
84
73
|
}
|
|
85
74
|
/**
|
package/dist_ts/data/jwt.d.ts
CHANGED
|
@@ -29,10 +29,6 @@ export interface IJwt {
|
|
|
29
29
|
* an interval in millis to recheck token invalidation
|
|
30
30
|
*/
|
|
31
31
|
refreshEvery: number;
|
|
32
|
-
/**
|
|
33
|
-
* legacy field kept for compatibility with already-issued jwt documents
|
|
34
|
-
*/
|
|
35
|
-
refreshToken?: string;
|
|
36
32
|
/**
|
|
37
33
|
* just for looks/debugging
|
|
38
34
|
*/
|
|
@@ -4,10 +4,6 @@ export interface ILoginSession {
|
|
|
4
4
|
userId: string | null;
|
|
5
5
|
validUntil: number;
|
|
6
6
|
invalidated: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* legacy plaintext refresh token field kept so existing sessions can migrate on first use
|
|
9
|
-
*/
|
|
10
|
-
refreshToken?: string | null;
|
|
11
7
|
refreshTokenHash?: string | null;
|
|
12
8
|
rotatedRefreshTokenHashes?: string[];
|
|
13
9
|
transferTokenHash?: string | null;
|
package/dist_ts/request/jwt.d.ts
CHANGED
|
@@ -1,39 +1,37 @@
|
|
|
1
1
|
import * as data from '../data/index.js';
|
|
2
2
|
import * as plugins from '../plugins.js';
|
|
3
3
|
/**
|
|
4
|
-
* Request to get the public
|
|
4
|
+
* Request to get the public keyset for JWT validation.
|
|
5
5
|
*
|
|
6
6
|
* **Direction:** Client → idp.global
|
|
7
7
|
* **Requester:** Backend services that need to verify JWTs
|
|
8
8
|
* **Handler:** idp.global
|
|
9
9
|
*
|
|
10
|
-
* Use this to fetch
|
|
10
|
+
* Use this to fetch every currently accepted public key for verifying JWT signatures.
|
|
11
11
|
* The backend token authenticates the requesting service.
|
|
12
12
|
*/
|
|
13
|
-
export interface
|
|
14
|
-
method: '
|
|
13
|
+
export interface IReq_GetPublicKeysForValidation extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_GetPublicKeysForValidation> {
|
|
14
|
+
method: 'getPublicKeysForValidation';
|
|
15
15
|
request: {
|
|
16
16
|
backendToken: string;
|
|
17
17
|
};
|
|
18
18
|
response: {
|
|
19
|
-
publicKeyPem: string;
|
|
20
19
|
publicKeys: data.IJwtVerificationKey[];
|
|
21
20
|
};
|
|
22
21
|
}
|
|
23
22
|
/**
|
|
24
|
-
* Push public
|
|
23
|
+
* Push the complete public keyset to connected backend services for JWT validation.
|
|
25
24
|
*
|
|
26
25
|
* **Direction:** idp.global → Client
|
|
27
26
|
* **Requester:** idp.global (pushes when the JWT signing key rotates)
|
|
28
27
|
* **Handler:** Backend services - must register a TypedHandler for this method
|
|
29
28
|
*
|
|
30
|
-
* Backend services
|
|
31
|
-
*
|
|
29
|
+
* Backend services must register a matching handler to receive key-rotation
|
|
30
|
+
* updates and replace their local verification keyset.
|
|
32
31
|
*/
|
|
33
|
-
export interface
|
|
34
|
-
method: '
|
|
32
|
+
export interface IReq_PushPublicKeysForValidation extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_PushPublicKeysForValidation> {
|
|
33
|
+
method: 'pushPublicKeysForValidation';
|
|
35
34
|
request: {
|
|
36
|
-
publicKeyPem: string;
|
|
37
35
|
publicKeys: data.IJwtVerificationKey[];
|
|
38
36
|
};
|
|
39
37
|
response: {};
|
|
@@ -62,7 +62,7 @@ export interface IReq_ExchangeRefreshTokenAndTransferToken extends plugins.typed
|
|
|
62
62
|
request: {
|
|
63
63
|
transferToken?: string;
|
|
64
64
|
refreshToken?: string;
|
|
65
|
-
|
|
65
|
+
transferTarget: data.ITransferTarget;
|
|
66
66
|
};
|
|
67
67
|
response: {
|
|
68
68
|
refreshToken?: string;
|
package/package.json
CHANGED
package/readme.md
CHANGED
|
@@ -52,6 +52,11 @@ const organization: data.IOrganization = {
|
|
|
52
52
|
};
|
|
53
53
|
```
|
|
54
54
|
|
|
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
|
|
58
|
+
response contracts that transport them.
|
|
59
|
+
|
|
55
60
|
## TypedRequest Contracts
|
|
56
61
|
|
|
57
62
|
Use `request` when registering handlers or creating typed clients with `@api.global/typedrequest` or `@api.global/typedsocket`.
|
|
@@ -67,6 +72,20 @@ const payload: LoginRequest['request'] = {
|
|
|
67
72
|
};
|
|
68
73
|
```
|
|
69
74
|
|
|
75
|
+
JWT verification-key distribution is keyset-only and uses plural method names:
|
|
76
|
+
|
|
77
|
+
```ts
|
|
78
|
+
type GetValidationKeys = request.IReq_GetPublicKeysForValidation;
|
|
79
|
+
type PushValidationKeys = request.IReq_PushPublicKeysForValidation;
|
|
80
|
+
|
|
81
|
+
const transferRequest: request.IReq_ExchangeRefreshTokenAndTransferToken['request'] = {
|
|
82
|
+
refreshToken: 'opaque-refresh-token',
|
|
83
|
+
transferTarget: {
|
|
84
|
+
appUrl: 'https://app.example/',
|
|
85
|
+
},
|
|
86
|
+
};
|
|
87
|
+
```
|
|
88
|
+
|
|
70
89
|
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.
|
|
71
90
|
|
|
72
91
|
OIDC app contracts expose only client configuration and safe credential
|
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/app.ts
CHANGED
|
@@ -79,20 +79,9 @@ export interface ICustomOidcApp {
|
|
|
79
79
|
export type IApp = IGlobalApp | IPartnerApp | ICustomOidcApp;
|
|
80
80
|
|
|
81
81
|
/**
|
|
82
|
-
*
|
|
83
|
-
* that expects a flat app structure (e.g., idpclient, transfermanager)
|
|
82
|
+
* Browser destination used by the refresh/transfer-token exchange flow.
|
|
84
83
|
*/
|
|
85
|
-
export interface
|
|
86
|
-
/**
|
|
87
|
-
* must be unique
|
|
88
|
-
*/
|
|
89
|
-
id: string;
|
|
90
|
-
/**
|
|
91
|
-
* should be unique
|
|
92
|
-
*/
|
|
93
|
-
name: string;
|
|
94
|
-
description: string;
|
|
95
|
-
logoUrl: string;
|
|
84
|
+
export interface ITransferTarget {
|
|
96
85
|
appUrl: string;
|
|
97
86
|
}
|
|
98
87
|
|
package/ts/data/jwt.ts
CHANGED
package/ts/data/loginsession.ts
CHANGED
|
@@ -4,10 +4,6 @@ export interface ILoginSession {
|
|
|
4
4
|
userId: string | null;
|
|
5
5
|
validUntil: number;
|
|
6
6
|
invalidated: boolean;
|
|
7
|
-
/**
|
|
8
|
-
* legacy plaintext refresh token field kept so existing sessions can migrate on first use
|
|
9
|
-
*/
|
|
10
|
-
refreshToken?: string | null;
|
|
11
7
|
refreshTokenHash?: string | null;
|
|
12
8
|
rotatedRefreshTokenHashes?: string[];
|
|
13
9
|
transferTokenHash?: string | null;
|
package/ts/readme.md
CHANGED
|
@@ -67,7 +67,7 @@ The `request` export includes typed request contracts for:
|
|
|
67
67
|
- organization CRUD-style requests
|
|
68
68
|
- invitations and membership changes
|
|
69
69
|
- app and admin actions
|
|
70
|
-
- billing and JWT validation support
|
|
70
|
+
- billing and JWT validation-keyset support
|
|
71
71
|
- alert and passport approval flows
|
|
72
72
|
- OIDC authorization preparation and completion
|
|
73
73
|
|
|
@@ -113,8 +113,15 @@ type TSessions = request.IReq_GetUserSessions['response']['sessions'];
|
|
|
113
113
|
type TUserInfo = data.IUserInfoResponse;
|
|
114
114
|
type TOidcSettings = data.IOidcSettings;
|
|
115
115
|
type TJwtVerificationKey = data.IJwtVerificationKey;
|
|
116
|
+
type TGetValidationKeys = request.IReq_GetPublicKeysForValidation;
|
|
117
|
+
type TPushValidationKeys = request.IReq_PushPublicKeysForValidation;
|
|
116
118
|
```
|
|
117
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.
|
|
124
|
+
|
|
118
125
|
Public app contracts contain client type, callback and post-logout URIs,
|
|
119
126
|
allowed scopes, grant types, and bounded token lifetime settings. Secret hashes,
|
|
120
127
|
private signing keys, and persistence records for authorization codes, access
|
package/ts/request/jwt.ts
CHANGED
|
@@ -2,48 +2,46 @@ import * as data from '../data/index.js';
|
|
|
2
2
|
import * as plugins from '../plugins.js';
|
|
3
3
|
|
|
4
4
|
/**
|
|
5
|
-
* Request to get the public
|
|
5
|
+
* Request to get the public keyset for JWT validation.
|
|
6
6
|
*
|
|
7
7
|
* **Direction:** Client → idp.global
|
|
8
8
|
* **Requester:** Backend services that need to verify JWTs
|
|
9
9
|
* **Handler:** idp.global
|
|
10
10
|
*
|
|
11
|
-
* Use this to fetch
|
|
11
|
+
* Use this to fetch every currently accepted public key for verifying JWT signatures.
|
|
12
12
|
* The backend token authenticates the requesting service.
|
|
13
13
|
*/
|
|
14
|
-
export interface
|
|
14
|
+
export interface IReq_GetPublicKeysForValidation
|
|
15
15
|
extends plugins.typedRequestInterfaces.implementsTR<
|
|
16
16
|
plugins.typedRequestInterfaces.ITypedRequest,
|
|
17
|
-
|
|
17
|
+
IReq_GetPublicKeysForValidation
|
|
18
18
|
> {
|
|
19
|
-
method: '
|
|
19
|
+
method: 'getPublicKeysForValidation';
|
|
20
20
|
request: {
|
|
21
21
|
backendToken: string;
|
|
22
22
|
};
|
|
23
23
|
response: {
|
|
24
|
-
publicKeyPem: string;
|
|
25
24
|
publicKeys: data.IJwtVerificationKey[];
|
|
26
25
|
};
|
|
27
26
|
}
|
|
28
27
|
|
|
29
28
|
/**
|
|
30
|
-
* Push public
|
|
29
|
+
* Push the complete public keyset to connected backend services for JWT validation.
|
|
31
30
|
*
|
|
32
31
|
* **Direction:** idp.global → Client
|
|
33
32
|
* **Requester:** idp.global (pushes when the JWT signing key rotates)
|
|
34
33
|
* **Handler:** Backend services - must register a TypedHandler for this method
|
|
35
34
|
*
|
|
36
|
-
* Backend services
|
|
37
|
-
*
|
|
35
|
+
* Backend services must register a matching handler to receive key-rotation
|
|
36
|
+
* updates and replace their local verification keyset.
|
|
38
37
|
*/
|
|
39
|
-
export interface
|
|
38
|
+
export interface IReq_PushPublicKeysForValidation
|
|
40
39
|
extends plugins.typedRequestInterfaces.implementsTR<
|
|
41
40
|
plugins.typedRequestInterfaces.ITypedRequest,
|
|
42
|
-
|
|
41
|
+
IReq_PushPublicKeysForValidation
|
|
43
42
|
> {
|
|
44
|
-
method: '
|
|
43
|
+
method: 'pushPublicKeysForValidation';
|
|
45
44
|
request: {
|
|
46
|
-
publicKeyPem: string;
|
|
47
45
|
publicKeys: data.IJwtVerificationKey[];
|
|
48
46
|
};
|
|
49
47
|
response: {};
|
package/ts/request/login.ts
CHANGED