@idp.global/interfaces 30.1.0 → 30.3.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,49 @@
1
1
  # Changelog
2
2
 
3
+ ## 2026-11-12 - 30.3.0
4
+
5
+ ### Features
6
+
7
+ - a stored email verification on the user (data)
8
+ - `IUser.data.emailVerification` is required: `IUserEmailVerification` (`address`, `verifiedAt` in epoch ms, `method`)
9
+ or `null` while the current address is unverified. `address` always equals `IUser.data.email`; changing the email
10
+ resets the verification to `null`.
11
+ - Code that builds `IUser['data']` must now set `emailVerification` (the idp.global app is the only producer).
12
+ - `TUserEmailVerificationMethod` is the closed set `registration`, `sign-in-code`, `magic-link`, `password-reset`
13
+ and `fixture` (local development fixtures, never a proof of control); `userEmailVerificationMethods` lists it for
14
+ validators.
15
+ - `IIdTokenClaims.email_verified` and `IUserInfoResponse.email_verified` are documented as
16
+ `emailVerification !== null`, independent of the account `status`.
17
+
18
+ ## 2026-11-12 - 30.2.0
19
+
20
+ ### Features
21
+
22
+ - app connections in the OIDC flow (data, request, dto)
23
+ - `IOidcAppConnectionAuthorizationRequest` is the `authorization_details` entry of type `app_connection` that a
24
+ global app allowed to request app connections sends; `IOidcAppConnectionAuthorizationResult` is
25
+ `ITokenResponse.authorization_details` on the authorization-code grant; `IOidcAppConnectionView` is the
26
+ `IReq_PrepareOidcAuthorizationV2` response `appConnection`; `IReq_InspectOidcAuthorizationV2` responds
27
+ `appConnection: { requiresPasskey: true }`.
28
+ - `IAuthorizationRequest.authorization_details` is the RFC 9396 query parameter, a JSON-encoded array of
29
+ `IOidcAppConnectionAuthorizationRequest`; the server rejects a malformed value or an unknown `type` with
30
+ `invalid_authorization_details`. `IOidcDiscoveryDocument.authorization_details_types_supported` lists the
31
+ supported types (idp.global advertises `['app_connection']` from app 16.4.0).
32
+ - `IReq_SetGlobalAppConnectionRequests` (`setGlobalAppConnectionRequests`, classified global-admin) allows or stops a
33
+ global app's app-connection requests and returns the resulting state; `IReq_GetGlobalAppStats` entries carry an
34
+ optional `mayRequestAppConnections`. `IGlobalAppDto` is unchanged.
35
+ - The activity vocabulary gains `oidc_client_app_connection_requests_enabled` and
36
+ `oidc_client_app_connection_requests_disabled` (target `oidc_client`, facts `clientType`).
37
+
38
+ ### Maintenance
39
+
40
+ - release tooling currency (tooling)
41
+ - Replaces the deprecated `@git.zone/tsbuild`, `@git.zone/tstest`, `@git.zone/tsdoc` and `@git.zone/tsrun` with
42
+ `@git.zone/tsrepo` `^2.1.0`. The scripts run `tsrepo build`, `tsrepo test` and `tsrepo docs`, and the tests import
43
+ `@git.zone/tsrepo/tapbundle`. The build now compiles with the TypeScript 7 native compiler; the published file list is
44
+ unchanged.
45
+ - `packageManager` pnpm@12.18.0 and `@types/node` 26.6.6.
46
+
3
47
  ## 2026-10-30 - 30.1.0
4
48
 
5
49
  ### Features
@@ -3,7 +3,7 @@
3
3
  */
4
4
  export const commitinfo = {
5
5
  name: '@idp.global/interfaces',
6
- version: '30.1.0',
6
+ version: '30.3.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,4 +1,4 @@
1
- export type TActivityAction = 'login' | 'logout' | 'session_created' | 'session_revoked' | 'passport_device_enrolled' | 'passport_device_revoked' | 'passport_challenge_approved' | 'passport_challenge_rejected' | 'org_created' | 'org_updated' | 'org_deleted' | 'org_ownership_transferred' | 'org_joined' | 'org_left' | 'role_changed' | 'org_app_role_mappings_updated' | 'profile_updated' | 'totp_enabled' | 'totp_disabled' | 'backup_codes_regenerated' | 'mfa_completed' | 'passkey_registered' | 'passkey_revoked' | 'passkey_login' | 'app_connected' | 'app_disconnected' | 'user_suspended' | 'user_unsuspended' | 'global_admin_granted' | 'global_admin_removed' | 'global_capabilities_changed' | 'break_glass_requested' | 'break_glass_activated' | 'break_glass_used' | 'break_glass_reviewed' | 'administrator_recovery_requested' | 'administrator_recovery_activated' | 'administrator_recovery_completed' | 'account_deletion_requested' | 'account_deletion_cancelled' | 'account_purged' | 'sso_connection_created' | 'sso_connection_updated' | 'sso_connection_deleted' | 'sso_domain_verified' | 'sso_login' | 'scim_token_created' | 'scim_token_revoked' | 'scim_user_provisioned' | 'scim_user_updated' | 'scim_user_deactivated' | 'scim_group_membership_changed' | 'oidc_authorization_granted' | 'oidc_code_exchanged' | 'oidc_refresh_rotated' | 'oidc_refresh_reuse_detected' | 'oidc_token_revoked' | 'oidc_logout' | 'oidc_client_created' | 'oidc_client_updated' | 'oidc_client_activation_changed' | 'oidc_client_deleted' | 'oidc_client_secret_rotated' | 'oidc_signing_key_rotated' | 'oidc_lifecycle_revoked' | 'org_suspended' | 'org_unsuspended';
1
+ export type TActivityAction = 'login' | 'logout' | 'session_created' | 'session_revoked' | 'passport_device_enrolled' | 'passport_device_revoked' | 'passport_challenge_approved' | 'passport_challenge_rejected' | 'org_created' | 'org_updated' | 'org_deleted' | 'org_ownership_transferred' | 'org_joined' | 'org_left' | 'role_changed' | 'org_app_role_mappings_updated' | 'profile_updated' | 'totp_enabled' | 'totp_disabled' | 'backup_codes_regenerated' | 'mfa_completed' | 'passkey_registered' | 'passkey_revoked' | 'passkey_login' | 'app_connected' | 'app_disconnected' | 'user_suspended' | 'user_unsuspended' | 'global_admin_granted' | 'global_admin_removed' | 'global_capabilities_changed' | 'break_glass_requested' | 'break_glass_activated' | 'break_glass_used' | 'break_glass_reviewed' | 'administrator_recovery_requested' | 'administrator_recovery_activated' | 'administrator_recovery_completed' | 'account_deletion_requested' | 'account_deletion_cancelled' | 'account_purged' | 'sso_connection_created' | 'sso_connection_updated' | 'sso_connection_deleted' | 'sso_domain_verified' | 'sso_login' | 'scim_token_created' | 'scim_token_revoked' | 'scim_user_provisioned' | 'scim_user_updated' | 'scim_user_deactivated' | 'scim_group_membership_changed' | 'oidc_authorization_granted' | 'oidc_code_exchanged' | 'oidc_refresh_rotated' | 'oidc_refresh_reuse_detected' | 'oidc_token_revoked' | 'oidc_logout' | 'oidc_client_created' | 'oidc_client_updated' | 'oidc_client_activation_changed' | 'oidc_client_deleted' | 'oidc_client_secret_rotated' | 'oidc_client_app_connection_requests_enabled' | 'oidc_client_app_connection_requests_disabled' | 'oidc_signing_key_rotated' | 'oidc_lifecycle_revoked' | 'org_suspended' | 'org_unsuspended';
2
2
  export type TActivityOutcome = 'attempted' | 'succeeded' | 'denied' | 'failed';
3
3
  /**
4
4
  * Public failure reasons are deliberately finite and non-descriptive. They
@@ -1,4 +1,4 @@
1
- export declare const globalCapabilities: readonly ["global.oidc-client.read", "global.oidc-client.manage", "global.organization.read", "global.organization.manage", "global.alert.read", "global.alert.manage", "global.user.read", "global.user.manage", "global.user.delete", "global.admin.manage", "global.signing-key.rotate", "global.break-glass.request", "global.break-glass.approve"];
1
+ export declare const globalCapabilities: readonly ['global.oidc-client.read', 'global.oidc-client.manage', 'global.organization.read', 'global.organization.manage', 'global.alert.read', 'global.alert.manage', 'global.user.read', 'global.user.manage', 'global.user.delete', 'global.admin.manage', 'global.signing-key.rotate', 'global.break-glass.request', 'global.break-glass.approve'];
2
2
  export type TGlobalCapability = (typeof globalCapabilities)[number];
3
3
  export declare const delegableGlobalCapabilities: readonly ["global.oidc-client.read", "global.oidc-client.manage", "global.organization.read", "global.organization.manage", "global.alert.read", "global.alert.manage", "global.user.read", "global.user.manage", "global.break-glass.request"];
4
4
  export type TDelegableGlobalCapability = (typeof delegableGlobalCapabilities)[number];
@@ -9,7 +9,7 @@ export type TDelegableGlobalCapability = (typeof delegableGlobalCapabilities)[nu
9
9
  */
10
10
  export declare const breakGlassEligibleGlobalCapabilities: readonly ["global.oidc-client.manage", "global.organization.manage", "global.alert.manage", "global.user.manage"];
11
11
  export type TBreakGlassEligibleGlobalCapability = (typeof breakGlassEligibleGlobalCapabilities)[number];
12
- export declare const tenantCapabilities: readonly ["tenant.organization.read", "tenant.organization.manage", "tenant.organization.delete", "tenant.organization.export", "tenant.role.read", "tenant.role.manage", "tenant.membership.read", "tenant.membership.manage", "tenant.ownership.transfer", "tenant.app-connection.read", "tenant.app-connection.manage", "tenant.sso.read", "tenant.sso.manage", "tenant.scim-token.read", "tenant.scim-token.manage", "tenant.billing.read", "tenant.billing.manage", "tenant.alert.read", "tenant.alert.manage"];
12
+ export declare const tenantCapabilities: readonly ['tenant.organization.read', 'tenant.organization.manage', 'tenant.organization.delete', 'tenant.organization.export', 'tenant.role.read', 'tenant.role.manage', 'tenant.membership.read', 'tenant.membership.manage', 'tenant.ownership.transfer', 'tenant.app-connection.read', 'tenant.app-connection.manage', 'tenant.sso.read', 'tenant.sso.manage', 'tenant.scim-token.read', 'tenant.scim-token.manage', 'tenant.billing.read', 'tenant.billing.manage', 'tenant.alert.read', 'tenant.alert.manage'];
13
13
  export type TTenantCapability = (typeof tenantCapabilities)[number];
14
14
  export declare const delegableTenantCapabilities: readonly ["tenant.organization.read", "tenant.organization.manage", "tenant.organization.export", "tenant.role.read", "tenant.role.manage", "tenant.membership.read", "tenant.membership.manage", "tenant.app-connection.read", "tenant.app-connection.manage", "tenant.sso.read", "tenant.sso.manage", "tenant.scim-token.read", "tenant.scim-token.manage", "tenant.billing.read", "tenant.billing.manage", "tenant.alert.read", "tenant.alert.manage"];
15
15
  export type TDelegableTenantCapability = (typeof delegableTenantCapabilities)[number];
@@ -18,6 +18,12 @@ export interface IOidcDiscoveryDocument {
18
18
  /** Optional RFC 7662 support; older providers may omit introspection. */
19
19
  introspection_endpoint?: string;
20
20
  introspection_endpoint_auth_methods_supported?: string[];
21
+ /**
22
+ * The RFC 9396 authorization-details types the server supports, server-wide. idp.global
23
+ * advertises `['app_connection']` from app 16.4.0; whether a given client may send one is gated
24
+ * by that client's stored capability.
25
+ */
26
+ authorization_details_types_supported?: string[];
21
27
  end_session_endpoint: string;
22
28
  scopes_supported: TOidcScope[];
23
29
  response_types_supported: string[];
@@ -72,6 +78,7 @@ export interface IIdTokenClaims {
72
78
  preferred_username?: string;
73
79
  picture?: string;
74
80
  email?: string;
81
+ /** Whether `IUser.data.emailVerification` records a verification of `email`. */
75
82
  email_verified?: boolean;
76
83
  organizations?: IOrganizationClaim[];
77
84
  roles?: string[];
@@ -98,6 +105,7 @@ export interface IUserInfoResponse {
98
105
  preferred_username?: string;
99
106
  picture?: string;
100
107
  email?: string;
108
+ /** Whether `IUser.data.emailVerification` records a verification of `email`. */
101
109
  email_verified?: boolean;
102
110
  organizations?: IOrganizationClaim[];
103
111
  roles?: string[];
@@ -115,6 +123,47 @@ export interface ITokenResponse {
115
123
  refresh_token?: string;
116
124
  id_token?: string;
117
125
  scope: string;
126
+ /** What the authorization did besides signing in (RFC 9396), on the authorization-code grant only. */
127
+ authorization_details?: IOidcAppConnectionAuthorizationResult[];
128
+ }
129
+ /**
130
+ * An app connection as an OIDC authorization detail (`authorization_details`, RFC 9396 style):
131
+ * a global app whose stored capability allows it to request app connections (a global
132
+ * administrator sets it with `setGlobalAppConnectionRequests`) asks, in its V2 authorization
133
+ * request, that the signed-in member connect an app to one of their organizations, or disconnect
134
+ * it. The member signs in with a passkey and consents; the connection takes effect when the
135
+ * client redeems the code, and the token response reports it. The connection is made before the
136
+ * tokens are issued, so after any redemption error a client re-reads the connection state instead
137
+ * of assuming that nothing changed.
138
+ */
139
+ export interface IOidcAppConnectionAuthorizationRequest {
140
+ type: 'app_connection';
141
+ action: 'connect' | 'disconnect';
142
+ organization_id: string;
143
+ /** The `https:` origin of the app's registered `appUrl`; it must name exactly one active global app. */
144
+ app_origin: string;
145
+ /** The user the client expects to sign in. */
146
+ subject: string;
147
+ }
148
+ /** The token endpoint's report of an app connection. */
149
+ export interface IOidcAppConnectionAuthorizationResult {
150
+ type: 'app_connection';
151
+ action: 'connect' | 'disconnect';
152
+ organization_id: string;
153
+ app_id: string;
154
+ status: 'active' | 'disconnected';
155
+ }
156
+ /** What the login prompt shows the member about an app connection before they allow it. */
157
+ export interface IOidcAppConnectionView {
158
+ action: 'connect' | 'disconnect';
159
+ organizationName: string;
160
+ appName: string;
161
+ appUrl: string;
162
+ appLogoUrl: string;
163
+ /** The scopes the connection grants: the app's reviewed scopes. */
164
+ scopes: string[];
165
+ /** The sign-in used a passkey recently enough to change the organization's apps. */
166
+ passkeyFresh: boolean;
118
167
  }
119
168
  /**
120
169
  * Token endpoint error response
@@ -137,6 +186,12 @@ export interface IAuthorizationRequest {
137
186
  code_challenge_method: 'S256';
138
187
  nonce?: string;
139
188
  prompt?: 'none' | 'login' | 'consent';
189
+ /**
190
+ * The RFC 9396 `authorization_details` query parameter: a JSON-encoded array of
191
+ * `IOidcAppConnectionAuthorizationRequest`. The server rejects a malformed value or an unknown
192
+ * `type` with `invalid_authorization_details` (RFC 9396 section 5) and never ignores it.
193
+ */
194
+ authorization_details?: string;
140
195
  }
141
196
  /**
142
197
  * Token request for authorization_code grant
@@ -49,12 +49,38 @@ export type TAdministratorRecovery = IAdministratorRecoveryBase & ({
49
49
  completedAt: number;
50
50
  passkeyCredentialRef: string;
51
51
  });
52
+ /**
53
+ * How idp.global learned that the user controls an email address. The set is closed:
54
+ * - `registration`: the registration's emailed code or link was confirmed before the
55
+ * account was created;
56
+ * - `sign-in-code`: an emailed sign-in code was entered;
57
+ * - `magic-link`: an emailed sign-in link was followed;
58
+ * - `password-reset`: an emailed password-reset link was completed;
59
+ * - `fixture`: a local development fixture (development IdP persona, seed data); nobody
60
+ * proved control of the address.
61
+ */
62
+ export declare const userEmailVerificationMethods: readonly ['registration', 'sign-in-code', 'magic-link', 'password-reset', 'fixture'];
63
+ export type TUserEmailVerificationMethod = (typeof userEmailVerificationMethods)[number];
64
+ /** A verification of the user's current email address. */
65
+ export interface IUserEmailVerification {
66
+ /** The verified address; always equal to `IUser.data.email`. */
67
+ address: string;
68
+ /** epoch ms when the verification was recorded */
69
+ verifiedAt: number;
70
+ method: TUserEmailVerificationMethod;
71
+ }
52
72
  export interface IUser {
53
73
  id: string;
54
74
  data: {
55
75
  name: string;
56
76
  username: string;
57
77
  email: string;
78
+ /**
79
+ * The verification of `email`, or null while it is unverified. Changing `email`
80
+ * resets it to null. The OIDC `email_verified` claim is `emailVerification !== null`;
81
+ * the account `status` does not affect it.
82
+ */
83
+ emailVerification: IUserEmailVerification | null;
58
84
  /**
59
85
  * mobile number used for verification
60
86
  */
@@ -1,3 +1,20 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import {} from './role.js';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2RhdGEvdXNlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQWMsTUFBTSxXQUFXLENBQUMifQ==
3
+ /**
4
+ * How idp.global learned that the user controls an email address. The set is closed:
5
+ * - `registration`: the registration's emailed code or link was confirmed before the
6
+ * account was created;
7
+ * - `sign-in-code`: an emailed sign-in code was entered;
8
+ * - `magic-link`: an emailed sign-in link was followed;
9
+ * - `password-reset`: an emailed password-reset link was completed;
10
+ * - `fixture`: a local development fixture (development IdP persona, seed data); nobody
11
+ * proved control of the address.
12
+ */
13
+ export const userEmailVerificationMethods = [
14
+ 'registration',
15
+ 'sign-in-code',
16
+ 'magic-link',
17
+ 'password-reset',
18
+ 'fixture',
19
+ ];
20
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidXNlci5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL2RhdGEvdXNlci50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQWMsTUFBTSxXQUFXLENBQUM7QUF1RXZDOzs7Ozs7Ozs7R0FTRztBQUNILE1BQU0sQ0FBQyxNQUFNLDRCQUE0QixHQUFHO0lBQzFDLGNBQWM7SUFDZCxjQUFjO0lBQ2QsWUFBWTtJQUNaLGdCQUFnQjtJQUNoQixTQUFTO0NBQ0QsQ0FBQyJ9
@@ -2,13 +2,13 @@ import type { TDelegableGlobalCapability } from '../data/authorization.js';
2
2
  export declare const devIdpManifestSchemaVersion: 3;
3
3
  export declare const devIdpResultSchemaVersion: 1;
4
4
  export declare const devIdpInternalPort: 2999;
5
- export declare const devIdpDerivedSubjectSentinel: "derived";
6
- export declare const devIdpPersonaAuthorityProfile: "platform-personas-v1";
5
+ export declare const devIdpDerivedSubjectSentinel: 'derived';
6
+ export declare const devIdpPersonaAuthorityProfile: 'platform-personas-v1';
7
7
  export declare const devIdpPersonaNames: readonly ["testuser", "testmoderator", "testsuperadmin"];
8
8
  export declare const devIdpHostnames: readonly ["idp.localhost", "login.idp.localhost", "app.idp.localhost", "superadmin.idp.localhost"];
9
9
  export declare const devIdpDegradedDependencies: Readonly<{
10
- readonly audit: "ephemeral-memory";
11
- readonly platform: "test-authorization";
10
+ readonly audit: 'ephemeral-memory';
11
+ readonly platform: 'test-authorization';
12
12
  }>;
13
13
  export type TDevIdpPersonaName = typeof devIdpPersonaNames[number];
14
14
  export declare const devIdpModeratorCapabilities: readonly ["global.alert.manage", "global.alert.read", "global.user.manage", "global.user.read"];
@@ -59,6 +59,10 @@ export type TActivityEventDto = TActivityEventFor<'login', 'account', {
59
59
  clientType: TOAuthClientType;
60
60
  }> | TActivityEventFor<'oidc_client_secret_rotated', 'oidc_client', {
61
61
  clientType: 'confidential';
62
+ }> | TActivityEventFor<'oidc_client_app_connection_requests_enabled', 'oidc_client', {
63
+ clientType: TOAuthClientType;
64
+ }> | TActivityEventFor<'oidc_client_app_connection_requests_disabled', 'oidc_client', {
65
+ clientType: TOAuthClientType;
62
66
  }> | TActivityEventFor<'oidc_signing_key_rotated', 'oidc_signing_key', null> | TActivityEventFor<'oidc_lifecycle_revoked', 'oidc_lifecycle', {
63
67
  revocationScope: TActivityRevocationScope;
64
68
  }> | TActivityEventFor<'org_suspended', 'organization', null> | TActivityEventFor<'org_unsuspended', 'organization', null>;
@@ -74,6 +74,12 @@ export interface IReq_GetGlobalAppStats extends plugins.typedRequestInterfaces.i
74
74
  apps: Array<{
75
75
  app: dto.IGlobalAppDto;
76
76
  connectionCount: number;
77
+ /**
78
+ * The app may request app connections in its OIDC authorizations (see
79
+ * `setGlobalAppConnectionRequests`). Absent from servers that predate the capability; treat
80
+ * absent as `false`.
81
+ */
82
+ mayRequestAppConnections?: boolean;
77
83
  }>;
78
84
  };
79
85
  }
@@ -115,6 +121,26 @@ export interface IReq_UpdateGlobalApp extends plugins.typedRequestInterfaces.imp
115
121
  app: dto.IGlobalAppDto;
116
122
  };
117
123
  }
124
+ /**
125
+ * Allow or stop a global app's requests for app connections in its OIDC
126
+ * authorizations (`IOidcAppConnectionAuthorizationRequest`); admin only, with
127
+ * `global.oidc-client.manage`. Only global apps carry the capability. Allowing
128
+ * requires a fresh passkey step-up; stopping does not. Setting the current
129
+ * state changes nothing, and neither direction revokes the app's tokens.
130
+ * The state appears only in admin responses, never in `IGlobalAppDto`.
131
+ */
132
+ export interface IReq_SetGlobalAppConnectionRequests extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_SetGlobalAppConnectionRequests> {
133
+ method: 'setGlobalAppConnectionRequests';
134
+ request: {
135
+ jwt: string;
136
+ appId: string;
137
+ mayRequestAppConnections: boolean;
138
+ };
139
+ response: {
140
+ /** The resulting state. */
141
+ mayRequestAppConnections: boolean;
142
+ };
143
+ }
118
144
  /**
119
145
  * Delete a global app (admin only)
120
146
  */
@@ -1,5 +1,5 @@
1
1
  import * as plugins from '../plugins.js';
2
- import { type TOidcScope } from '../data/index.js';
2
+ import { type IOidcAppConnectionView, type TOidcScope } from '../data/index.js';
3
3
  export interface IReq_CompleteOidcAuthorization extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_CompleteOidcAuthorization> {
4
4
  method: 'completeOidcAuthorization';
5
5
  request: {
@@ -53,6 +53,10 @@ export interface IReq_InspectOidcAuthorizationV2 extends plugins.typedRequestInt
53
53
  };
54
54
  response: {
55
55
  prompt: 'none' | 'login' | 'consent' | null;
56
+ /** The transaction asks for an app connection: the sign-in must use a passkey. Nothing more before the sign-in. */
57
+ appConnection?: {
58
+ requiresPasskey: true;
59
+ };
56
60
  };
57
61
  }
58
62
  export interface IReq_PrepareOidcAuthorizationV2 extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_PrepareOidcAuthorizationV2> {
@@ -61,7 +65,10 @@ export interface IReq_PrepareOidcAuthorizationV2 extends plugins.typedRequestInt
61
65
  jwt: string;
62
66
  transactionId: string;
63
67
  };
64
- response: IReq_PrepareOidcAuthorization['response'];
68
+ response: IReq_PrepareOidcAuthorization['response'] & {
69
+ /** The app connection the transaction asks for (its status is then always `consent_required`). */
70
+ appConnection?: IOidcAppConnectionView;
71
+ };
65
72
  }
66
73
  export interface IReq_CompleteOidcAuthorizationV2 extends plugins.typedRequestInterfaces.implementsTR<plugins.typedRequestInterfaces.ITypedRequest, IReq_CompleteOidcAuthorizationV2> {
67
74
  method: 'completeOidcAuthorizationV2';
@@ -1,3 +1,3 @@
1
1
  import * as plugins from '../plugins.js';
2
2
  import {} from '../data/index.js';
3
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yaXphdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3QvYXV0aG9yaXphdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQW1CLE1BQU0sa0JBQWtCLENBQUMifQ==
3
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiYXV0aG9yaXphdGlvbi5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbIi4uLy4uL3RzL3JlcXVlc3QvYXV0aG9yaXphdGlvbi50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSxPQUFPLEtBQUssT0FBTyxNQUFNLGVBQWUsQ0FBQztBQUN6QyxPQUFPLEVBQWdELE1BQU0sa0JBQWtCLENBQUMifQ==
@@ -1,10 +1,10 @@
1
- import type { IReq_AcknowledgeAppSecretDelivery, IReq_ApproveAdministratorRecovery, IReq_ApproveBreakGlassAccess, IReq_ApproveOidcSigningKeyRotation, IReq_CheckGlobalAdmin, IReq_CreateGlobalApp, IReq_DeleteGlobalApp, IReq_GetGlobalAppStats, IReq_GetGlobalOrgStats, IReq_GetGlobalUsers, IReq_RegenerateAppCredentials, IReq_RequestAdministratorRecovery, IReq_RequestBreakGlassAccess, IReq_ReviewBreakGlassAccess, IReq_RotateOidcSigningKey, IReq_SetGlobalAdmin, IReq_SetGlobalCapabilityAssignments, IReq_SetOrganizationSuspension, IReq_SetUserSuspension, IReq_UpdateGlobalApp } from './admin.js';
1
+ import type { IReq_AcknowledgeAppSecretDelivery, IReq_ApproveAdministratorRecovery, IReq_ApproveBreakGlassAccess, IReq_ApproveOidcSigningKeyRotation, IReq_CheckGlobalAdmin, IReq_CreateGlobalApp, IReq_DeleteGlobalApp, IReq_GetGlobalAppStats, IReq_GetGlobalOrgStats, IReq_GetGlobalUsers, IReq_RegenerateAppCredentials, IReq_RequestAdministratorRecovery, IReq_RequestBreakGlassAccess, IReq_ReviewBreakGlassAccess, IReq_RotateOidcSigningKey, IReq_SetGlobalAdmin, IReq_SetGlobalAppConnectionRequests, IReq_SetGlobalCapabilityAssignments, IReq_SetOrganizationSuspension, IReq_SetUserSuspension, IReq_UpdateGlobalApp } from './admin.js';
2
2
  import type { IReq_DeleteSuspendedUser } from './user.js';
3
- export type TGlobalAdminTypedRequest = IReq_AcknowledgeAppSecretDelivery | IReq_ApproveAdministratorRecovery | IReq_ApproveBreakGlassAccess | IReq_ApproveOidcSigningKeyRotation | IReq_CheckGlobalAdmin | IReq_CreateGlobalApp | IReq_DeleteGlobalApp | IReq_DeleteSuspendedUser | IReq_GetGlobalAppStats | IReq_GetGlobalOrgStats | IReq_GetGlobalUsers | IReq_RegenerateAppCredentials | IReq_RequestAdministratorRecovery | IReq_RequestBreakGlassAccess | IReq_ReviewBreakGlassAccess | IReq_RotateOidcSigningKey | IReq_SetGlobalAdmin | IReq_SetGlobalCapabilityAssignments | IReq_SetOrganizationSuspension | IReq_SetUserSuspension | IReq_UpdateGlobalApp;
3
+ export type TGlobalAdminTypedRequest = IReq_AcknowledgeAppSecretDelivery | IReq_ApproveAdministratorRecovery | IReq_ApproveBreakGlassAccess | IReq_ApproveOidcSigningKeyRotation | IReq_CheckGlobalAdmin | IReq_CreateGlobalApp | IReq_DeleteGlobalApp | IReq_DeleteSuspendedUser | IReq_GetGlobalAppStats | IReq_GetGlobalOrgStats | IReq_GetGlobalUsers | IReq_RegenerateAppCredentials | IReq_RequestAdministratorRecovery | IReq_RequestBreakGlassAccess | IReq_ReviewBreakGlassAccess | IReq_RotateOidcSigningKey | IReq_SetGlobalAdmin | IReq_SetGlobalAppConnectionRequests | IReq_SetGlobalCapabilityAssignments | IReq_SetOrganizationSuspension | IReq_SetUserSuspension | IReq_UpdateGlobalApp;
4
4
  export type TGlobalAdminTypedRequestMethod = TGlobalAdminTypedRequest['method'];
5
5
  /**
6
6
  * Canonical transport-boundary classification for platform-wide
7
7
  * administration. Consumers use this inventory to keep privileged request
8
8
  * methods off public transports.
9
9
  */
10
- export declare const globalAdminTypedRequestMethods: readonly ["checkGlobalAdmin", "getGlobalAppStats", "createGlobalApp", "updateGlobalApp", "deleteGlobalApp", "regenerateAppCredentials", "acknowledgeAppSecretDelivery", "rotateOidcSigningKey", "approveOidcSigningKeyRotation", "setOrganizationSuspension", "getGlobalUsers", "setUserSuspension", "setGlobalAdmin", "setGlobalCapabilityAssignments", "requestBreakGlassAccess", "approveBreakGlassAccess", "reviewBreakGlassAccess", "requestAdministratorRecovery", "approveAdministratorRecovery", "getGlobalOrgStats", "deleteSuspendedUser"];
10
+ export declare const globalAdminTypedRequestMethods: readonly ["checkGlobalAdmin", "getGlobalAppStats", "createGlobalApp", "updateGlobalApp", "setGlobalAppConnectionRequests", "deleteGlobalApp", "regenerateAppCredentials", "acknowledgeAppSecretDelivery", "rotateOidcSigningKey", "approveOidcSigningKeyRotation", "setOrganizationSuspension", "getGlobalUsers", "setUserSuspension", "setGlobalAdmin", "setGlobalCapabilityAssignments", "requestBreakGlassAccess", "approveBreakGlassAccess", "reviewBreakGlassAccess", "requestAdministratorRecovery", "approveAdministratorRecovery", "getGlobalOrgStats", "deleteSuspendedUser"];
@@ -8,6 +8,7 @@ export const globalAdminTypedRequestMethods = [
8
8
  'getGlobalAppStats',
9
9
  'createGlobalApp',
10
10
  'updateGlobalApp',
11
+ 'setGlobalAppConnectionRequests',
11
12
  'deleteGlobalApp',
12
13
  'regenerateAppCredentials',
13
14
  'acknowledgeAppSecretDelivery',
@@ -26,4 +27,4 @@ export const globalAdminTypedRequestMethods = [
26
27
  'getGlobalOrgStats',
27
28
  'deleteSuspendedUser',
28
29
  ];
29
- //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xvYmFsYWRtaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0L2dsb2JhbGFkbWluLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQWlEQTs7OztHQUlHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sOEJBQThCLEdBQUc7SUFDNUMsa0JBQWtCO0lBQ2xCLG1CQUFtQjtJQUNuQixpQkFBaUI7SUFDakIsaUJBQWlCO0lBQ2pCLGlCQUFpQjtJQUNqQiwwQkFBMEI7SUFDMUIsOEJBQThCO0lBQzlCLHNCQUFzQjtJQUN0QiwrQkFBK0I7SUFDL0IsMkJBQTJCO0lBQzNCLGdCQUFnQjtJQUNoQixtQkFBbUI7SUFDbkIsZ0JBQWdCO0lBQ2hCLGdDQUFnQztJQUNoQyx5QkFBeUI7SUFDekIseUJBQXlCO0lBQ3pCLHdCQUF3QjtJQUN4Qiw4QkFBOEI7SUFDOUIsOEJBQThCO0lBQzlCLG1CQUFtQjtJQUNuQixxQkFBcUI7Q0FDdUMsQ0FBQyJ9
30
+ //# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoiZ2xvYmFsYWRtaW4uanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyIuLi8uLi90cy9yZXF1ZXN0L2dsb2JhbGFkbWluLnRzIl0sIm5hbWVzIjpbXSwibWFwcGluZ3MiOiJBQW1EQTs7OztHQUlHO0FBQ0gsTUFBTSxDQUFDLE1BQU0sOEJBQThCLEdBQUc7SUFDNUMsa0JBQWtCO0lBQ2xCLG1CQUFtQjtJQUNuQixpQkFBaUI7SUFDakIsaUJBQWlCO0lBQ2pCLGdDQUFnQztJQUNoQyxpQkFBaUI7SUFDakIsMEJBQTBCO0lBQzFCLDhCQUE4QjtJQUM5QixzQkFBc0I7SUFDdEIsK0JBQStCO0lBQy9CLDJCQUEyQjtJQUMzQixnQkFBZ0I7SUFDaEIsbUJBQW1CO0lBQ25CLGdCQUFnQjtJQUNoQixnQ0FBZ0M7SUFDaEMseUJBQXlCO0lBQ3pCLHlCQUF5QjtJQUN6Qix3QkFBd0I7SUFDeEIsOEJBQThCO0lBQzlCLDhCQUE4QjtJQUM5QixtQkFBbUI7SUFDbkIscUJBQXFCO0NBQ3VDLENBQUMifQ==
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@idp.global/interfaces",
3
- "version": "30.1.0",
3
+ "version": "30.3.0",
4
4
  "private": false,
5
5
  "description": "Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.",
6
6
  "exports": {
@@ -23,12 +23,9 @@
23
23
  }
24
24
  },
25
25
  "devDependencies": {
26
- "@git.zone/tsbuild": "^5.1.2",
27
- "@git.zone/tsdoc": "^3.0.2",
28
- "@git.zone/tsrun": "^3.0.2",
29
- "@git.zone/tstest": "^7.2.0",
26
+ "@git.zone/tsrepo": "^2.1.0",
30
27
  "@push.rocks/smartmail": "^3.0.0",
31
- "@types/node": "26.6.3"
28
+ "@types/node": "26.6.6"
32
29
  },
33
30
  "files": [
34
31
  "ts/**/*",
@@ -60,8 +57,8 @@
60
57
  "last 1 chrome versions"
61
58
  ],
62
59
  "scripts": {
63
- "test": "tstest test/ --verbose --logfile --timeout 60",
64
- "build": "tsbuild tsfolders --allowimplicitany",
65
- "buildDocs": "tsdoc"
60
+ "test": "tsrepo test test/ --verbose --logfile --timeout 60",
61
+ "build": "tsrepo build tsfolders --allowimplicitany",
62
+ "buildDocs": "tsrepo docs"
66
63
  }
67
64
  }
package/readme.md CHANGED
@@ -118,6 +118,20 @@ a caller-stable operation id. Customer-defined organization roles carry a
118
118
  sorted `capabilities` list; tenant deletion and ownership transfer remain
119
119
  reserved to the built-in owner role.
120
120
 
121
+ A global app may ask, in its OIDC authorization, that the signed-in member
122
+ connect an app to one of their organizations or disconnect it: an
123
+ `authorization_details` entry `data.IOidcAppConnectionAuthorizationRequest`,
124
+ reported on the token response as `data.IOidcAppConnectionAuthorizationResult`.
125
+ The entries travel JSON-encoded in the `authorization_details` query parameter
126
+ (`data.IAuthorizationRequest.authorization_details`); a malformed value or an
127
+ unknown `type` fails with `invalid_authorization_details`. The discovery
128
+ document lists the supported types in `authorization_details_types_supported`.
129
+ Only a global app whose stored capability allows it may ask. A global
130
+ administrator sets that capability with `setGlobalAppConnectionRequests` and
131
+ reads it in `getGlobalAppStats`; it never appears in `IGlobalAppDto`. Changes
132
+ are recorded as the `oidc_client_app_connection_requests_enabled` and
133
+ `oidc_client_app_connection_requests_disabled` activity actions.
134
+
121
135
  The target hash is derived server-side from the canonical, authorized
122
136
  `ITransferTarget.appUrl`; the raw target URL is never persisted in session
123
137
  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: '30.1.0',
6
+ version: '30.3.0',
7
7
  description: 'Shared TypeScript interfaces and TypedRequest contracts for the idp.global ecosystem.'
8
8
  }
@@ -62,6 +62,8 @@ export type TActivityAction =
62
62
  | 'oidc_client_activation_changed'
63
63
  | 'oidc_client_deleted'
64
64
  | 'oidc_client_secret_rotated'
65
+ | 'oidc_client_app_connection_requests_enabled'
66
+ | 'oidc_client_app_connection_requests_disabled'
65
67
  | 'oidc_signing_key_rotated'
66
68
  | 'oidc_lifecycle_revoked'
67
69
  | 'org_suspended'
package/ts/data/oidc.ts CHANGED
@@ -20,6 +20,12 @@ export interface IOidcDiscoveryDocument {
20
20
  /** Optional RFC 7662 support; older providers may omit introspection. */
21
21
  introspection_endpoint?: string;
22
22
  introspection_endpoint_auth_methods_supported?: string[];
23
+ /**
24
+ * The RFC 9396 authorization-details types the server supports, server-wide. idp.global
25
+ * advertises `['app_connection']` from app 16.4.0; whether a given client may send one is gated
26
+ * by that client's stored capability.
27
+ */
28
+ authorization_details_types_supported?: string[];
23
29
  end_session_endpoint: string;
24
30
  scopes_supported: TOidcScope[];
25
31
  response_types_supported: string[];
@@ -81,6 +87,7 @@ export interface IIdTokenClaims {
81
87
 
82
88
  // Email scope claims
83
89
  email?: string;
90
+ /** Whether `IUser.data.emailVerification` records a verification of `email`. */
84
91
  email_verified?: boolean;
85
92
 
86
93
  // Custom claims for organizations scope
@@ -117,6 +124,7 @@ export interface IUserInfoResponse {
117
124
 
118
125
  // Email scope
119
126
  email?: string;
127
+ /** Whether `IUser.data.emailVerification` records a verification of `email`. */
120
128
  email_verified?: boolean;
121
129
 
122
130
  // Organizations scope (custom)
@@ -139,6 +147,50 @@ export interface ITokenResponse {
139
147
  refresh_token?: string;
140
148
  id_token?: string;
141
149
  scope: string;
150
+ /** What the authorization did besides signing in (RFC 9396), on the authorization-code grant only. */
151
+ authorization_details?: IOidcAppConnectionAuthorizationResult[];
152
+ }
153
+
154
+ /**
155
+ * An app connection as an OIDC authorization detail (`authorization_details`, RFC 9396 style):
156
+ * a global app whose stored capability allows it to request app connections (a global
157
+ * administrator sets it with `setGlobalAppConnectionRequests`) asks, in its V2 authorization
158
+ * request, that the signed-in member connect an app to one of their organizations, or disconnect
159
+ * it. The member signs in with a passkey and consents; the connection takes effect when the
160
+ * client redeems the code, and the token response reports it. The connection is made before the
161
+ * tokens are issued, so after any redemption error a client re-reads the connection state instead
162
+ * of assuming that nothing changed.
163
+ */
164
+ export interface IOidcAppConnectionAuthorizationRequest {
165
+ type: 'app_connection';
166
+ action: 'connect' | 'disconnect';
167
+ organization_id: string;
168
+ /** The `https:` origin of the app's registered `appUrl`; it must name exactly one active global app. */
169
+ app_origin: string;
170
+ /** The user the client expects to sign in. */
171
+ subject: string;
172
+ }
173
+
174
+ /** The token endpoint's report of an app connection. */
175
+ export interface IOidcAppConnectionAuthorizationResult {
176
+ type: 'app_connection';
177
+ action: 'connect' | 'disconnect';
178
+ organization_id: string;
179
+ app_id: string;
180
+ status: 'active' | 'disconnected';
181
+ }
182
+
183
+ /** What the login prompt shows the member about an app connection before they allow it. */
184
+ export interface IOidcAppConnectionView {
185
+ action: 'connect' | 'disconnect';
186
+ organizationName: string;
187
+ appName: string;
188
+ appUrl: string;
189
+ appLogoUrl: string;
190
+ /** The scopes the connection grants: the app's reviewed scopes. */
191
+ scopes: string[];
192
+ /** The sign-in used a passkey recently enough to change the organization's apps. */
193
+ passkeyFresh: boolean;
142
194
  }
143
195
 
144
196
  /**
@@ -163,6 +215,12 @@ export interface IAuthorizationRequest {
163
215
  code_challenge_method: 'S256';
164
216
  nonce?: string;
165
217
  prompt?: 'none' | 'login' | 'consent';
218
+ /**
219
+ * The RFC 9396 `authorization_details` query parameter: a JSON-encoded array of
220
+ * `IOidcAppConnectionAuthorizationRequest`. The server rejects a malformed value or an unknown
221
+ * `type` with `invalid_authorization_details` (RFC 9396 section 5) and never ignores it.
222
+ */
223
+ authorization_details?: string;
166
224
  }
167
225
 
168
226
  /**
package/ts/data/user.ts CHANGED
@@ -70,12 +70,47 @@ export type TAdministratorRecovery = IAdministratorRecoveryBase & (
70
70
  }
71
71
  );
72
72
 
73
+ /**
74
+ * How idp.global learned that the user controls an email address. The set is closed:
75
+ * - `registration`: the registration's emailed code or link was confirmed before the
76
+ * account was created;
77
+ * - `sign-in-code`: an emailed sign-in code was entered;
78
+ * - `magic-link`: an emailed sign-in link was followed;
79
+ * - `password-reset`: an emailed password-reset link was completed;
80
+ * - `fixture`: a local development fixture (development IdP persona, seed data); nobody
81
+ * proved control of the address.
82
+ */
83
+ export const userEmailVerificationMethods = [
84
+ 'registration',
85
+ 'sign-in-code',
86
+ 'magic-link',
87
+ 'password-reset',
88
+ 'fixture',
89
+ ] as const;
90
+
91
+ export type TUserEmailVerificationMethod = (typeof userEmailVerificationMethods)[number];
92
+
93
+ /** A verification of the user's current email address. */
94
+ export interface IUserEmailVerification {
95
+ /** The verified address; always equal to `IUser.data.email`. */
96
+ address: string;
97
+ /** epoch ms when the verification was recorded */
98
+ verifiedAt: number;
99
+ method: TUserEmailVerificationMethod;
100
+ }
101
+
73
102
  export interface IUser {
74
103
  id: string;
75
104
  data: {
76
105
  name: string;
77
106
  username: string;
78
107
  email: string;
108
+ /**
109
+ * The verification of `email`, or null while it is unverified. Changing `email`
110
+ * resets it to null. The OIDC `email_verified` claim is `emailVerification !== null`;
111
+ * the account `status` does not affect it.
112
+ */
113
+ emailVerification: IUserEmailVerification | null;
79
114
 
80
115
  /**
81
116
  * mobile number used for verification
@@ -154,6 +154,16 @@ export type TActivityEventDto =
154
154
  'oidc_client',
155
155
  { clientType: 'confidential' }
156
156
  >
157
+ | TActivityEventFor<
158
+ 'oidc_client_app_connection_requests_enabled',
159
+ 'oidc_client',
160
+ { clientType: TOAuthClientType }
161
+ >
162
+ | TActivityEventFor<
163
+ 'oidc_client_app_connection_requests_disabled',
164
+ 'oidc_client',
165
+ { clientType: TOAuthClientType }
166
+ >
157
167
  | TActivityEventFor<'oidc_signing_key_rotated', 'oidc_signing_key', null>
158
168
  | TActivityEventFor<
159
169
  'oidc_lifecycle_revoked',
@@ -95,6 +95,12 @@ export interface IReq_GetGlobalAppStats
95
95
  apps: Array<{
96
96
  app: dto.IGlobalAppDto;
97
97
  connectionCount: number;
98
+ /**
99
+ * The app may request app connections in its OIDC authorizations (see
100
+ * `setGlobalAppConnectionRequests`). Absent from servers that predate the capability; treat
101
+ * absent as `false`.
102
+ */
103
+ mayRequestAppConnections?: boolean;
98
104
  }>;
99
105
  };
100
106
  }
@@ -147,6 +153,31 @@ export interface IReq_UpdateGlobalApp
147
153
  };
148
154
  }
149
155
 
156
+ /**
157
+ * Allow or stop a global app's requests for app connections in its OIDC
158
+ * authorizations (`IOidcAppConnectionAuthorizationRequest`); admin only, with
159
+ * `global.oidc-client.manage`. Only global apps carry the capability. Allowing
160
+ * requires a fresh passkey step-up; stopping does not. Setting the current
161
+ * state changes nothing, and neither direction revokes the app's tokens.
162
+ * The state appears only in admin responses, never in `IGlobalAppDto`.
163
+ */
164
+ export interface IReq_SetGlobalAppConnectionRequests
165
+ extends plugins.typedRequestInterfaces.implementsTR<
166
+ plugins.typedRequestInterfaces.ITypedRequest,
167
+ IReq_SetGlobalAppConnectionRequests
168
+ > {
169
+ method: 'setGlobalAppConnectionRequests';
170
+ request: {
171
+ jwt: string;
172
+ appId: string;
173
+ mayRequestAppConnections: boolean;
174
+ };
175
+ response: {
176
+ /** The resulting state. */
177
+ mayRequestAppConnections: boolean;
178
+ };
179
+ }
180
+
150
181
  /**
151
182
  * Delete a global app (admin only)
152
183
  */
@@ -1,5 +1,5 @@
1
1
  import * as plugins from '../plugins.js';
2
- import { type TOidcScope } from '../data/index.js';
2
+ import { type IOidcAppConnectionView, type TOidcScope } from '../data/index.js';
3
3
 
4
4
  export interface IReq_CompleteOidcAuthorization
5
5
  extends plugins.typedRequestInterfaces.implementsTR<
@@ -68,6 +68,8 @@ export interface IReq_InspectOidcAuthorizationV2
68
68
  };
69
69
  response: {
70
70
  prompt: 'none' | 'login' | 'consent' | null;
71
+ /** The transaction asks for an app connection: the sign-in must use a passkey. Nothing more before the sign-in. */
72
+ appConnection?: { requiresPasskey: true };
71
73
  };
72
74
  }
73
75
 
@@ -81,7 +83,10 @@ export interface IReq_PrepareOidcAuthorizationV2
81
83
  jwt: string;
82
84
  transactionId: string;
83
85
  };
84
- response: IReq_PrepareOidcAuthorization['response'];
86
+ response: IReq_PrepareOidcAuthorization['response'] & {
87
+ /** The app connection the transaction asks for (its status is then always `consent_required`). */
88
+ appConnection?: IOidcAppConnectionView;
89
+ };
85
90
  }
86
91
 
87
92
  export interface IReq_CompleteOidcAuthorizationV2
@@ -15,6 +15,7 @@ import type {
15
15
  IReq_ReviewBreakGlassAccess,
16
16
  IReq_RotateOidcSigningKey,
17
17
  IReq_SetGlobalAdmin,
18
+ IReq_SetGlobalAppConnectionRequests,
18
19
  IReq_SetGlobalCapabilityAssignments,
19
20
  IReq_SetOrganizationSuspension,
20
21
  IReq_SetUserSuspension,
@@ -40,6 +41,7 @@ export type TGlobalAdminTypedRequest =
40
41
  | IReq_ReviewBreakGlassAccess
41
42
  | IReq_RotateOidcSigningKey
42
43
  | IReq_SetGlobalAdmin
44
+ | IReq_SetGlobalAppConnectionRequests
43
45
  | IReq_SetGlobalCapabilityAssignments
44
46
  | IReq_SetOrganizationSuspension
45
47
  | IReq_SetUserSuspension
@@ -57,6 +59,7 @@ export const globalAdminTypedRequestMethods = [
57
59
  'getGlobalAppStats',
58
60
  'createGlobalApp',
59
61
  'updateGlobalApp',
62
+ 'setGlobalAppConnectionRequests',
60
63
  'deleteGlobalApp',
61
64
  'regenerateAppCredentials',
62
65
  'acknowledgeAppSecretDelivery',