@idp.global/interfaces 1.2.0 → 3.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 +17 -0
- package/dist_ts/00_commitinfo_data.js +1 -1
- package/dist_ts/data/oidc.d.ts +4 -2
- package/dist_ts/data/userinvitation.d.ts +29 -20
- package/dist_ts/request/authorization.d.ts +4 -4
- package/dist_ts/request/userinvitation.d.ts +2 -2
- package/package.json +3 -3
- package/ts/00_commitinfo_data.ts +1 -1
- package/ts/data/oidc.ts +4 -2
- package/ts/data/userinvitation.ts +14 -4
- package/ts/request/authorization.ts +4 -4
- package/ts/request/userinvitation.ts +2 -2
package/changelog.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 2026-06-21 - 3.0.0
|
|
4
|
+
|
|
5
|
+
### Breaking Changes
|
|
6
|
+
|
|
7
|
+
- require PKCE parameters and refresh token family IDs (oidc)
|
|
8
|
+
- Require codeChallenge and codeChallengeMethod on OIDC authorization code data and authorization request contracts.
|
|
9
|
+
- Add required familyId to refresh token data for rotation family tracking.
|
|
10
|
+
|
|
11
|
+
## 2026-06-20 - 2.0.0
|
|
12
|
+
|
|
13
|
+
### Breaking Changes
|
|
14
|
+
|
|
15
|
+
- update invitation contracts for hashed tokens and JWT acceptance (userinvitation)
|
|
16
|
+
- Split public invitation data from internal persisted records and expose tokenHash only on IUserInvitationRecord
|
|
17
|
+
- Replace userId with jwt in the acceptInvitation request contract
|
|
18
|
+
- Bump tsdoc and Node type dev dependencies
|
|
19
|
+
|
|
3
20
|
## 2026-06-10 - 1.2.0
|
|
4
21
|
|
|
5
22
|
### Features
|
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
*/
|
|
4
4
|
export const commitinfo = {
|
|
5
5
|
name: '@idp.global/interfaces',
|
|
6
|
-
version: '
|
|
6
|
+
version: '3.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,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiMDBfY29tbWl0aW5mb19kYXRhLmpzIiwic291cmNlUm9vdCI6IiIsInNvdXJjZXMiOlsiLi4vdHMvMDBfY29tbWl0aW5mb19kYXRhLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQUFBOztHQUVHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sVUFBVSxHQUFHO0lBQ3hCLElBQUksRUFBRSx3QkFBd0I7SUFDOUIsT0FBTyxFQUFFLE9BQU87SUFDaEIsV0FBVyxFQUFFLHVGQUF1RjtDQUNyRyxDQUFBIn0=
|
package/dist_ts/data/oidc.d.ts
CHANGED
|
@@ -22,9 +22,9 @@ export interface IAuthorizationCode {
|
|
|
22
22
|
/** Redirect URI used in authorization request */
|
|
23
23
|
redirectUri: string;
|
|
24
24
|
/** PKCE code challenge (S256 hashed) */
|
|
25
|
-
codeChallenge
|
|
25
|
+
codeChallenge: string;
|
|
26
26
|
/** PKCE code challenge method */
|
|
27
|
-
codeChallengeMethod
|
|
27
|
+
codeChallengeMethod: 'S256';
|
|
28
28
|
/** Nonce from authorization request (for ID token) */
|
|
29
29
|
nonce?: string;
|
|
30
30
|
/** Expiration timestamp (10 minutes from creation) */
|
|
@@ -69,6 +69,8 @@ export interface IOidcRefreshToken {
|
|
|
69
69
|
userId: string;
|
|
70
70
|
/** Granted scopes */
|
|
71
71
|
scopes: TOidcScope[];
|
|
72
|
+
/** Rotation family identifier for refresh token reuse detection */
|
|
73
|
+
familyId: string;
|
|
72
74
|
/** Expiration timestamp */
|
|
73
75
|
expiresAt: number;
|
|
74
76
|
/** Creation timestamp */
|
|
@@ -7,26 +7,35 @@
|
|
|
7
7
|
*/
|
|
8
8
|
export interface IUserInvitation {
|
|
9
9
|
id: string;
|
|
10
|
-
data:
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
10
|
+
data: IUserInvitationData;
|
|
11
|
+
}
|
|
12
|
+
export interface IUserInvitationData {
|
|
13
|
+
/** The invited email address - unique key for sharing across orgs */
|
|
14
|
+
email: string;
|
|
15
|
+
/** Current status of the invitation */
|
|
16
|
+
status: 'pending' | 'accepted' | 'expired' | 'cancelled';
|
|
17
|
+
/** When the invitation was first created */
|
|
18
|
+
createdAt: number;
|
|
19
|
+
/** When the invitation expires (createdAt + 90 days) */
|
|
20
|
+
expiresAt: number;
|
|
21
|
+
/**
|
|
22
|
+
* Organizations that have invited this email.
|
|
23
|
+
* Multiple orgs can link to the same invitation.
|
|
24
|
+
*/
|
|
25
|
+
organizationRefs: IOrganizationInvitationRef[];
|
|
26
|
+
/** When the invitation was accepted (user registered/folded) */
|
|
27
|
+
acceptedAt?: number;
|
|
28
|
+
/** The User ID after conversion (when accepted) */
|
|
29
|
+
convertedToUserId?: string;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Internal persisted invitation record. Do not return this shape to clients.
|
|
33
|
+
*/
|
|
34
|
+
export interface IUserInvitationRecord {
|
|
35
|
+
id: string;
|
|
36
|
+
data: IUserInvitationData & {
|
|
37
|
+
/** Hashed one-time invitation token for link validation */
|
|
38
|
+
tokenHash: string;
|
|
30
39
|
};
|
|
31
40
|
}
|
|
32
41
|
/**
|
|
@@ -22,8 +22,8 @@ export interface IReq_CompleteOidcAuthorization extends plugins.typedRequestInte
|
|
|
22
22
|
scope: string;
|
|
23
23
|
state: string;
|
|
24
24
|
prompt?: 'none' | 'login' | 'consent';
|
|
25
|
-
codeChallenge
|
|
26
|
-
codeChallengeMethod
|
|
25
|
+
codeChallenge: string;
|
|
26
|
+
codeChallengeMethod: 'S256';
|
|
27
27
|
nonce?: string;
|
|
28
28
|
consentApproved?: boolean;
|
|
29
29
|
};
|
|
@@ -41,8 +41,8 @@ export interface IReq_PrepareOidcAuthorization extends plugins.typedRequestInter
|
|
|
41
41
|
scope: string;
|
|
42
42
|
state: string;
|
|
43
43
|
prompt?: 'none' | 'login' | 'consent';
|
|
44
|
-
codeChallenge
|
|
45
|
-
codeChallengeMethod
|
|
44
|
+
codeChallenge: string;
|
|
45
|
+
codeChallengeMethod: 'S256';
|
|
46
46
|
nonce?: string;
|
|
47
47
|
};
|
|
48
48
|
response: {
|
|
@@ -127,13 +127,13 @@ export interface IReq_TransferOwnership extends plugins.typedRequestInterfaces.i
|
|
|
127
127
|
};
|
|
128
128
|
}
|
|
129
129
|
/**
|
|
130
|
-
* Accept an invitation
|
|
130
|
+
* Accept an invitation for the authenticated user.
|
|
131
131
|
*/
|
|
132
132
|
export interface IReq_AcceptInvitation extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_AcceptInvitation> {
|
|
133
133
|
method: 'acceptInvitation';
|
|
134
134
|
request: {
|
|
135
135
|
token: string;
|
|
136
|
-
|
|
136
|
+
jwt: string;
|
|
137
137
|
};
|
|
138
138
|
response: {
|
|
139
139
|
success: boolean;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@idp.global/interfaces",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"description": "Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.",
|
|
6
6
|
"exports": {
|
|
@@ -15,10 +15,10 @@
|
|
|
15
15
|
},
|
|
16
16
|
"devDependencies": {
|
|
17
17
|
"@git.zone/tsbuild": "^4.4.2",
|
|
18
|
-
"@git.zone/tsdoc": "^2.
|
|
18
|
+
"@git.zone/tsdoc": "^2.1.1",
|
|
19
19
|
"@git.zone/tsrun": "^2.0.4",
|
|
20
20
|
"@git.zone/tstest": "^3.6.6",
|
|
21
|
-
"@types/node": "^
|
|
21
|
+
"@types/node": "^26.0.0"
|
|
22
22
|
},
|
|
23
23
|
"files": [
|
|
24
24
|
"ts/**/*",
|
package/ts/00_commitinfo_data.ts
CHANGED
package/ts/data/oidc.ts
CHANGED
|
@@ -24,9 +24,9 @@ export interface IAuthorizationCode {
|
|
|
24
24
|
/** Redirect URI used in authorization request */
|
|
25
25
|
redirectUri: string;
|
|
26
26
|
/** PKCE code challenge (S256 hashed) */
|
|
27
|
-
codeChallenge
|
|
27
|
+
codeChallenge: string;
|
|
28
28
|
/** PKCE code challenge method */
|
|
29
|
-
codeChallengeMethod
|
|
29
|
+
codeChallengeMethod: 'S256';
|
|
30
30
|
/** Nonce from authorization request (for ID token) */
|
|
31
31
|
nonce?: string;
|
|
32
32
|
/** Expiration timestamp (10 minutes from creation) */
|
|
@@ -73,6 +73,8 @@ export interface IOidcRefreshToken {
|
|
|
73
73
|
userId: string;
|
|
74
74
|
/** Granted scopes */
|
|
75
75
|
scopes: TOidcScope[];
|
|
76
|
+
/** Rotation family identifier for refresh token reuse detection */
|
|
77
|
+
familyId: string;
|
|
76
78
|
/** Expiration timestamp */
|
|
77
79
|
expiresAt: number;
|
|
78
80
|
/** Creation timestamp */
|
|
@@ -9,13 +9,13 @@ import * as plugins from '../plugins.js';
|
|
|
9
9
|
*/
|
|
10
10
|
export interface IUserInvitation {
|
|
11
11
|
id: string;
|
|
12
|
-
data:
|
|
12
|
+
data: IUserInvitationData;
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
export interface IUserInvitationData {
|
|
13
16
|
/** The invited email address - unique key for sharing across orgs */
|
|
14
17
|
email: string;
|
|
15
18
|
|
|
16
|
-
/** Secure token for invitation link validation */
|
|
17
|
-
token: string;
|
|
18
|
-
|
|
19
19
|
/** Current status of the invitation */
|
|
20
20
|
status: 'pending' | 'accepted' | 'expired' | 'cancelled';
|
|
21
21
|
|
|
@@ -36,6 +36,16 @@ export interface IUserInvitation {
|
|
|
36
36
|
|
|
37
37
|
/** The User ID after conversion (when accepted) */
|
|
38
38
|
convertedToUserId?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
/**
|
|
42
|
+
* Internal persisted invitation record. Do not return this shape to clients.
|
|
43
|
+
*/
|
|
44
|
+
export interface IUserInvitationRecord {
|
|
45
|
+
id: string;
|
|
46
|
+
data: IUserInvitationData & {
|
|
47
|
+
/** Hashed one-time invitation token for link validation */
|
|
48
|
+
tokenHash: string;
|
|
39
49
|
};
|
|
40
50
|
}
|
|
41
51
|
|
|
@@ -32,8 +32,8 @@ export interface IReq_CompleteOidcAuthorization
|
|
|
32
32
|
scope: string;
|
|
33
33
|
state: string;
|
|
34
34
|
prompt?: 'none' | 'login' | 'consent';
|
|
35
|
-
codeChallenge
|
|
36
|
-
codeChallengeMethod
|
|
35
|
+
codeChallenge: string;
|
|
36
|
+
codeChallengeMethod: 'S256';
|
|
37
37
|
nonce?: string;
|
|
38
38
|
consentApproved?: boolean;
|
|
39
39
|
};
|
|
@@ -56,8 +56,8 @@ export interface IReq_PrepareOidcAuthorization
|
|
|
56
56
|
scope: string;
|
|
57
57
|
state: string;
|
|
58
58
|
prompt?: 'none' | 'login' | 'consent';
|
|
59
|
-
codeChallenge
|
|
60
|
-
codeChallengeMethod
|
|
59
|
+
codeChallenge: string;
|
|
60
|
+
codeChallengeMethod: 'S256';
|
|
61
61
|
nonce?: string;
|
|
62
62
|
};
|
|
63
63
|
response: {
|
|
@@ -168,7 +168,7 @@ export interface IReq_TransferOwnership
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
/**
|
|
171
|
-
* Accept an invitation
|
|
171
|
+
* Accept an invitation for the authenticated user.
|
|
172
172
|
*/
|
|
173
173
|
export interface IReq_AcceptInvitation
|
|
174
174
|
extends plugins.typedRequestInterfaces.implementsTR<
|
|
@@ -178,7 +178,7 @@ export interface IReq_AcceptInvitation
|
|
|
178
178
|
method: 'acceptInvitation';
|
|
179
179
|
request: {
|
|
180
180
|
token: string;
|
|
181
|
-
|
|
181
|
+
jwt: string;
|
|
182
182
|
};
|
|
183
183
|
response: {
|
|
184
184
|
success: boolean;
|