@thunderid/node 1.16.1 → 1.17.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.
@@ -2195,6 +2195,45 @@ const matchManagementUrl = (target, collections) => {
2195
2195
  return url.pathname === base || url.pathname.startsWith(`${base}/`);
2196
2196
  }) ? url : void 0;
2197
2197
  };
2198
+ /**
2199
+ * Whether a relayed request starts an administrator-initiated flow at `{baseUrl}/flow/execute`, such as
2200
+ * `sendUserAttributeVerification`. Only a start is relayed: a `POST` whose JSON body names the
2201
+ * `ADMIN_INITIATED` flow type and no execution. The server gates such a start on the caller's own
2202
+ * permission, and the user continues it from the link without a token, so the relay never adds the
2203
+ * token to any other flow request.
2204
+ *
2205
+ * @param target - The absolute URL the browser asked for.
2206
+ * @param method - The request method, upper case.
2207
+ * @param body - The serialized request body.
2208
+ * @param baseUrl - The server URL from the configuration.
2209
+ * @returns The parsed URL when the request is such a start, otherwise `undefined`.
2210
+ */
2211
+ const matchAdminInitiatedFlowStart = (target, method, body, baseUrl) => {
2212
+ if (method !== "POST" || typeof body !== "string" || !baseUrl) return;
2213
+ let executeUrl;
2214
+ try {
2215
+ executeUrl = new URL(`${baseUrl.replace(/\/+$/, "")}/flow/execute`);
2216
+ } catch {
2217
+ return;
2218
+ }
2219
+ const url = matchManagementUrl(target, [executeUrl]);
2220
+ if (url?.pathname !== executeUrl.pathname || url.search) return;
2221
+ let payload;
2222
+ try {
2223
+ payload = JSON.parse(body);
2224
+ } catch {
2225
+ return;
2226
+ }
2227
+ if (!payload || typeof payload !== "object") return;
2228
+ const start = payload;
2229
+ const fields = [
2230
+ "flowType",
2231
+ "handle",
2232
+ "inputs",
2233
+ "verbose"
2234
+ ];
2235
+ return start["flowType"] === __thunderid_javascript.EmbeddedFlowType.AdminInitiated && Object.keys(start).every((key) => fields.includes(key)) ? url : void 0;
2236
+ };
2198
2237
 
2199
2238
  //#endregion
2200
2239
  //#region src/utils/getSessionCookieOptions.ts
@@ -2232,6 +2271,7 @@ exports.evaluateAccesses = evaluateAccesses_default;
2232
2271
  exports.generateSessionId = generateSessionId_default;
2233
2272
  exports.getManagementCollectionUrls = getManagementCollectionUrls;
2234
2273
  exports.getSessionCookieOptions = getSessionCookieOptions_default;
2274
+ exports.matchAdminInitiatedFlowStart = matchAdminInitiatedFlowStart;
2235
2275
  exports.matchManagementUrl = matchManagementUrl;
2236
2276
  exports.searchActions = searchActions_default;
2237
2277
  Object.keys(__thunderid_javascript).forEach(function (k) {
package/dist/index.d.ts CHANGED
@@ -20,7 +20,7 @@ export type { LogoutRecordStore, PresentedSession } from './utils/LoggedOutSessi
20
20
  export type { IndexedSessions, SessionBinding } from './utils/SessionIndex';
21
21
  export { default as generateSessionId } from './utils/generateSessionId';
22
22
  export { default as createManagementClient } from './utils/createManagementClient';
23
- export { MANAGEMENT_COLLECTIONS, MANAGEMENT_COLLECTION_KEYS, getManagementCollectionUrls, matchManagementUrl, type ManagementCollectionKey, } from './utils/managementCollections';
23
+ export { MANAGEMENT_COLLECTIONS, MANAGEMENT_COLLECTION_KEYS, getManagementCollectionUrls, matchAdminInitiatedFlowStart, matchManagementUrl, type ManagementCollectionKey, } from './utils/managementCollections';
24
24
  export { default as getSessionCookieOptions } from './utils/getSessionCookieOptions';
25
25
  export * from '@thunderid/javascript';
26
26
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAaA;;GAEG;AAGH,OAAO,EAAC,OAAO,IAAI,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAGrE,OAAO,EAAC,OAAO,IAAI,YAAY,EAAC,MAAM,0BAA0B,CAAC;AAGjE,YAAY,EAAC,mBAAmB,EAAE,mBAAmB,EAAC,MAAM,iBAAiB,CAAC;AAC9E,YAAY,EAAC,OAAO,IAAI,eAAe,EAAC,MAAM,0BAA0B,CAAC;AACzE,YAAY,EACV,qBAAqB,EACrB,0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,EAAC,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAE,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AAClG,YAAY,EAAC,iBAAiB,EAAE,gBAAgB,EAAC,MAAM,2BAA2B,CAAC;AACnF,YAAY,EAAC,eAAe,EAAE,cAAc,EAAC,MAAM,sBAAsB,CAAC;AAC1E,OAAO,EAAC,OAAO,IAAI,iBAAiB,EAAC,MAAM,2BAA2B,CAAC;AACvE,OAAO,EAAC,OAAO,IAAI,sBAAsB,EAAC,MAAM,gCAAgC,CAAC;AACjF,OAAO,EACL,sBAAsB,EACtB,0BAA0B,EAC1B,2BAA2B,EAC3B,4BAA4B,EAC5B,kBAAkB,EAClB,KAAK,uBAAuB,GAC7B,MAAM,+BAA+B,CAAC;AACvC,OAAO,EAAC,OAAO,IAAI,uBAAuB,EAAC,MAAM,iCAAiC,CAAC;AAGnF,cAAc,uBAAuB,CAAC"}
package/dist/index.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import fetch$1, { Headers, Request, Response } from "cross-fetch";
2
- import { BackchannelLogoutConstants, InvalidLogoutTokenError, OrganizationUnitSwitchErrorCodes, ThunderIDAPIError, ThunderIDAuthException, ThunderIDJavaScriptClient, ThunderIDRuntimeError, addGroupMembers, addRoleAssignments, applyGatewayConfiguration, createAction, createAgent, createAgentType, createApplication, createApplicationSharingPolicy, createAuthorizationDetailType, createConfigurationVersion, createConnection, createCredentialConfiguration, createDesignTheme, createFlow, createFlowSharingPolicy, createGateway, createGatewaySecret, createGatewayVariable, createGroup, createGroupByPath, createLayout, createNotificationTemplate, createOrganizationUnit, createPresentationDefinition, createProject, createResource, createResourceServer, createRole, createRoleSharingPolicy, createSecret, createUser, createUserByPath, createUserSharingPolicy, createVariable, deleteAction, deleteAgent, deleteAgentType, deleteApplication, deleteApplicationSharingPolicy, deleteAuthorizationDetailType, deleteClientRegistration, deleteConnection, deleteCredentialConfiguration, deleteDesignTheme, deleteFlow, deleteFlowSharingPolicy, deleteGateway, deleteGatewaySecret, deleteGatewayVariable, deleteGroup, deleteImportedConfiguration, deleteLayout, deleteNotificationTemplate, deleteOrganizationUnit, deleteOrganizationUnitByPath, deletePresentationDefinition, deleteProject, deleteResource, deleteResourceServer, deleteRole, deleteRoleSharingPolicy, deleteSecret, deleteTranslation, deleteTranslations, deleteUser, deleteUserSharingPolicy, deleteVariable, executeEmbeddedSelfFlow, exportConfiguration, getAction, getActions, getAgent, getAgentGroups, getAgentRoles, getAgentType, getAgentTypes, getAgents, getApplication, getApplicationOverlayRules, getApplicationSharingPolicies, getApplicationSharingPolicy, getApplications, getAuthorizationDetailType, getAuthorizationDetailTypes, getClientRegistration, getConfigurationVersion, getConfigurationVersions, getConnection, getConnectionUsages, getConnections, getConnectionsMeta, getCredentialConfiguration, getCredentialConfigurations, getDesignTheme, getDesignThemeUsages, getDesignThemes, getFlow, getFlowOverlayRules, getFlowSharingPolicies, getFlowSharingPolicy, getFlowUsages, getFlowVariables, getFlowVersion, getFlowVersions, getFlows, getGateway, getGatewayAppliedConfiguration, getGatewayAppliedVersion, getGatewayConfigurationDiff, getGatewayMaster, getGatewayMasterHistory, getGatewayMasterResource, getGatewaySecret, getGatewaySecrets, getGatewayVariable, getGatewayVariables, getGateways, getGroup, getGroupMembers, getGroups, getGroupsByPath, getLanguages, getLayout, getLayoutUsages, getLayouts, getNotificationTemplate, getNotificationTemplates, getOrganizationUnit, getOrganizationUnitByPath, getOrganizationUnitChildren, getOrganizationUnitGroups, getOrganizationUnitRoles, getOrganizationUnitUsers, getOrganizationUnits, getPresentationDefinition, getPresentationDefinitions, getProject, getProjects, getResource, getResourceServer, getResourceServers, getResources, getRole, getRoleAssignments, getRoleOverlayRules, getRoleSharingPolicies, getRoleSharingPolicy, getRoles, getSecret, getSecrets, getServerConfig, getServerConfigs, getUser, getUserGroups, getUserOverlayRules, getUserSharingPolicies, getUserSharingPolicy, getUserTypes, getUsers, getUsersByPath, getVariable, getVariables, getVendorPrefix, importConfiguration, logger, previewCimdDocument, regenerateClientSecret, regenerateFlowSecret, registerClient, removeGroupMembers, removeRoleAssignments, resolveDesign, resolveResourceEndpoint, resolveTranslation, resolveTranslations, restoreFlowVersion, revertGatewayConfiguration, setTranslation, setTranslations, suspendAgent, suspendApplication, suspendUser, unlockAgent, unlockUser, unsuspendAgent, unsuspendApplication, unsuspendUser, updateAction, updateAgent, updateAgentType, updateApplication, updateApplicationSharingPolicy, updateAuthorizationDetailType, updateClientRegistration, updateConnection, updateCredentialConfiguration, updateDesignTheme, updateFlow, updateFlowSharingPolicy, updateFlowVariables, updateGateway, updateGatewaySecret, updateGatewayVariable, updateGroup, updateLayout, updateMeCredentials, updateNotificationTemplate, updateOrganizationUnit, updateOrganizationUnitByPath, updatePresentationDefinition, updateProject, updateResource, updateResourceServer, updateRole, updateRoleSharingPolicy, updateSecret, updateServerConfig, updateUser, updateUserSharingPolicy, updateVariable } from "@thunderid/javascript";
2
+ import { BackchannelLogoutConstants, EmbeddedFlowType, InvalidLogoutTokenError, OrganizationUnitSwitchErrorCodes, ThunderIDAPIError, ThunderIDAuthException, ThunderIDJavaScriptClient, ThunderIDRuntimeError, addGroupMembers, addRoleAssignments, applyGatewayConfiguration, createAction, createAgent, createAgentType, createApplication, createApplicationSharingPolicy, createAuthorizationDetailType, createConfigurationVersion, createConnection, createCredentialConfiguration, createDesignTheme, createFlow, createFlowSharingPolicy, createGateway, createGatewaySecret, createGatewayVariable, createGroup, createGroupByPath, createLayout, createNotificationTemplate, createOrganizationUnit, createPresentationDefinition, createProject, createResource, createResourceServer, createRole, createRoleSharingPolicy, createSecret, createUser, createUserByPath, createUserSharingPolicy, createVariable, deleteAction, deleteAgent, deleteAgentType, deleteApplication, deleteApplicationSharingPolicy, deleteAuthorizationDetailType, deleteClientRegistration, deleteConnection, deleteCredentialConfiguration, deleteDesignTheme, deleteFlow, deleteFlowSharingPolicy, deleteGateway, deleteGatewaySecret, deleteGatewayVariable, deleteGroup, deleteImportedConfiguration, deleteLayout, deleteNotificationTemplate, deleteOrganizationUnit, deleteOrganizationUnitByPath, deletePresentationDefinition, deleteProject, deleteResource, deleteResourceServer, deleteRole, deleteRoleSharingPolicy, deleteSecret, deleteTranslation, deleteTranslations, deleteUser, deleteUserSharingPolicy, deleteVariable, executeEmbeddedSelfFlow, exportConfiguration, getAction, getActions, getAgent, getAgentGroups, getAgentRoles, getAgentType, getAgentTypes, getAgents, getApplication, getApplicationOverlayRules, getApplicationSharingPolicies, getApplicationSharingPolicy, getApplications, getAuthorizationDetailType, getAuthorizationDetailTypes, getClientRegistration, getConfigurationVersion, getConfigurationVersions, getConnection, getConnectionUsages, getConnections, getConnectionsMeta, getCredentialConfiguration, getCredentialConfigurations, getDesignTheme, getDesignThemeUsages, getDesignThemes, getFlow, getFlowOverlayRules, getFlowSharingPolicies, getFlowSharingPolicy, getFlowUsages, getFlowVariables, getFlowVersion, getFlowVersions, getFlows, getGateway, getGatewayAppliedConfiguration, getGatewayAppliedVersion, getGatewayConfigurationDiff, getGatewayMaster, getGatewayMasterHistory, getGatewayMasterResource, getGatewaySecret, getGatewaySecrets, getGatewayVariable, getGatewayVariables, getGateways, getGroup, getGroupMembers, getGroups, getGroupsByPath, getLanguages, getLayout, getLayoutUsages, getLayouts, getNotificationTemplate, getNotificationTemplates, getOrganizationUnit, getOrganizationUnitByPath, getOrganizationUnitChildren, getOrganizationUnitGroups, getOrganizationUnitRoles, getOrganizationUnitUsers, getOrganizationUnits, getPresentationDefinition, getPresentationDefinitions, getProject, getProjects, getResource, getResourceServer, getResourceServers, getResources, getRole, getRoleAssignments, getRoleOverlayRules, getRoleSharingPolicies, getRoleSharingPolicy, getRoles, getSecret, getSecrets, getServerConfig, getServerConfigs, getUser, getUserGroups, getUserOverlayRules, getUserSharingPolicies, getUserSharingPolicy, getUserTypes, getUsers, getUsersByPath, getVariable, getVariables, getVendorPrefix, importConfiguration, logger, previewCimdDocument, regenerateClientSecret, regenerateFlowSecret, registerClient, removeGroupMembers, removeRoleAssignments, resolveDesign, resolveResourceEndpoint, resolveTranslation, resolveTranslations, restoreFlowVersion, revertGatewayConfiguration, setTranslation, setTranslations, suspendAgent, suspendApplication, suspendUser, unlockAgent, unlockUser, unsuspendAgent, unsuspendApplication, unsuspendUser, updateAction, updateAgent, updateAgentType, updateApplication, updateApplicationSharingPolicy, updateAuthorizationDetailType, updateClientRegistration, updateConnection, updateCredentialConfiguration, updateDesignTheme, updateFlow, updateFlowSharingPolicy, updateFlowVariables, updateGateway, updateGatewaySecret, updateGatewayVariable, updateGroup, updateLayout, updateMeCredentials, updateNotificationTemplate, updateOrganizationUnit, updateOrganizationUnitByPath, updatePresentationDefinition, updateProject, updateResource, updateResourceServer, updateRole, updateRoleSharingPolicy, updateSecret, updateServerConfig, updateUser, updateUserSharingPolicy, updateVariable } from "@thunderid/javascript";
3
3
  import cache from "memory-cache";
4
4
  import base64url from "base64url";
5
5
  import sha256 from "fast-sha256";
@@ -2165,6 +2165,45 @@ const matchManagementUrl = (target, collections) => {
2165
2165
  return url.pathname === base || url.pathname.startsWith(`${base}/`);
2166
2166
  }) ? url : void 0;
2167
2167
  };
2168
+ /**
2169
+ * Whether a relayed request starts an administrator-initiated flow at `{baseUrl}/flow/execute`, such as
2170
+ * `sendUserAttributeVerification`. Only a start is relayed: a `POST` whose JSON body names the
2171
+ * `ADMIN_INITIATED` flow type and no execution. The server gates such a start on the caller's own
2172
+ * permission, and the user continues it from the link without a token, so the relay never adds the
2173
+ * token to any other flow request.
2174
+ *
2175
+ * @param target - The absolute URL the browser asked for.
2176
+ * @param method - The request method, upper case.
2177
+ * @param body - The serialized request body.
2178
+ * @param baseUrl - The server URL from the configuration.
2179
+ * @returns The parsed URL when the request is such a start, otherwise `undefined`.
2180
+ */
2181
+ const matchAdminInitiatedFlowStart = (target, method, body, baseUrl) => {
2182
+ if (method !== "POST" || typeof body !== "string" || !baseUrl) return;
2183
+ let executeUrl;
2184
+ try {
2185
+ executeUrl = new URL(`${baseUrl.replace(/\/+$/, "")}/flow/execute`);
2186
+ } catch {
2187
+ return;
2188
+ }
2189
+ const url = matchManagementUrl(target, [executeUrl]);
2190
+ if (url?.pathname !== executeUrl.pathname || url.search) return;
2191
+ let payload;
2192
+ try {
2193
+ payload = JSON.parse(body);
2194
+ } catch {
2195
+ return;
2196
+ }
2197
+ if (!payload || typeof payload !== "object") return;
2198
+ const start = payload;
2199
+ const fields = [
2200
+ "flowType",
2201
+ "handle",
2202
+ "inputs",
2203
+ "verbose"
2204
+ ];
2205
+ return start["flowType"] === EmbeddedFlowType.AdminInitiated && Object.keys(start).every((key) => fields.includes(key)) ? url : void 0;
2206
+ };
2168
2207
 
2169
2208
  //#endregion
2170
2209
  //#region src/utils/getSessionCookieOptions.ts
@@ -2185,4 +2224,4 @@ if (!globalThis.fetch) {
2185
2224
  }
2186
2225
 
2187
2226
  //#endregion
2188
- export { CookieChunking_default as CookieChunking, CookieConfig_default as CookieConfig, InMemoryLogoutRecordStore, LoggedOutSessions_default as LoggedOutSessions, MANAGEMENT_COLLECTIONS, MANAGEMENT_COLLECTION_KEYS, MemoryCacheStore_default as MemoryCacheStore, NodeCryptoUtils_default as NodeCryptoUtils, SessionIndex_default as SessionIndex, SessionUtils_default as SessionUtils, ThunderIDNodeClient_default as ThunderIDNodeClient, createManagementClient_default as createManagementClient, evaluateAccess_default as evaluateAccess, evaluateAccesses_default as evaluateAccesses, generateSessionId_default as generateSessionId, getManagementCollectionUrls, getSessionCookieOptions_default as getSessionCookieOptions, matchManagementUrl, searchActions_default as searchActions };
2227
+ export { CookieChunking_default as CookieChunking, CookieConfig_default as CookieConfig, InMemoryLogoutRecordStore, LoggedOutSessions_default as LoggedOutSessions, MANAGEMENT_COLLECTIONS, MANAGEMENT_COLLECTION_KEYS, MemoryCacheStore_default as MemoryCacheStore, NodeCryptoUtils_default as NodeCryptoUtils, SessionIndex_default as SessionIndex, SessionUtils_default as SessionUtils, ThunderIDNodeClient_default as ThunderIDNodeClient, createManagementClient_default as createManagementClient, evaluateAccess_default as evaluateAccess, evaluateAccesses_default as evaluateAccesses, generateSessionId_default as generateSessionId, getManagementCollectionUrls, getSessionCookieOptions_default as getSessionCookieOptions, matchAdminInitiatedFlowStart, matchManagementUrl, searchActions_default as searchActions };
@@ -23,4 +23,18 @@ export declare const getManagementCollectionUrls: (config: (ResourceEndpointConf
23
23
  * @returns The parsed URL when it is allowed, otherwise `undefined`.
24
24
  */
25
25
  export declare const matchManagementUrl: (target: unknown, collections: URL[]) => URL | undefined;
26
+ /**
27
+ * Whether a relayed request starts an administrator-initiated flow at `{baseUrl}/flow/execute`, such as
28
+ * `sendUserAttributeVerification`. Only a start is relayed: a `POST` whose JSON body names the
29
+ * `ADMIN_INITIATED` flow type and no execution. The server gates such a start on the caller's own
30
+ * permission, and the user continues it from the link without a token, so the relay never adds the
31
+ * token to any other flow request.
32
+ *
33
+ * @param target - The absolute URL the browser asked for.
34
+ * @param method - The request method, upper case.
35
+ * @param body - The serialized request body.
36
+ * @param baseUrl - The server URL from the configuration.
37
+ * @returns The parsed URL when the request is such a start, otherwise `undefined`.
38
+ */
39
+ export declare const matchAdminInitiatedFlowStart: (target: unknown, method: string, body: unknown, baseUrl: string | undefined) => URL | undefined;
26
40
  //# sourceMappingURL=managementCollections.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"managementCollections.d.ts","sourceRoot":"","sources":["../../src/utils/managementCollections.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,sBAAsB,EAAE,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAKvF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAC3C,MAAM,CACJ,OAAO,CACL,mBAAmB,EACjB,QAAQ,GACR,YAAY,GACZ,cAAc,GACd,0BAA0B,GAC1B,qBAAqB,GACrB,uBAAuB,GACvB,aAAa,GACb,0BAA0B,GAC1B,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,UAAU,GACV,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,uBAAuB,GACvB,mBAAmB,GACnB,yBAAyB,GACzB,UAAU,GACV,iBAAiB,GACjB,OAAO,GACP,SAAS,GACT,cAAc,GACd,OAAO,GACP,WAAW,GACX,WAAW,CACd,EACD,MAAM,CACP,CA4BF,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,sBAAsB,CAAC;AAE1E,eAAO,MAAM,0BAA0B,EAAE,uBAAuB,EAElC,CAAC;AAE/B;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GACtC,QAAQ,CAAC,sBAAsB,GAAG;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,GAAG,SAAS,KAChE,GAAG,EAsBL,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,OAAO,EAAE,aAAa,GAAG,EAAE,KAAG,GAAG,GAAG,SAgC9E,CAAC"}
1
+ {"version":3,"file":"managementCollections.d.ts","sourceRoot":"","sources":["../../src/utils/managementCollections.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAC,sBAAsB,EAAE,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAKvF;;;GAGG;AACH,eAAO,MAAM,sBAAsB,EAAE,QAAQ,CAC3C,MAAM,CACJ,OAAO,CACL,mBAAmB,EACjB,QAAQ,GACR,YAAY,GACZ,cAAc,GACd,0BAA0B,GAC1B,qBAAqB,GACrB,uBAAuB,GACvB,aAAa,GACb,0BAA0B,GAC1B,QAAQ,GACR,QAAQ,GACR,OAAO,GACP,UAAU,GACV,QAAQ,GACR,MAAM,GACN,QAAQ,GACR,uBAAuB,GACvB,mBAAmB,GACnB,yBAAyB,GACzB,UAAU,GACV,iBAAiB,GACjB,OAAO,GACP,SAAS,GACT,cAAc,GACd,OAAO,GACP,WAAW,GACX,WAAW,CACd,EACD,MAAM,CACP,CA4BF,CAAC;AAEF,MAAM,MAAM,uBAAuB,GAAG,MAAM,OAAO,sBAAsB,CAAC;AAE1E,eAAO,MAAM,0BAA0B,EAAE,uBAAuB,EAElC,CAAC;AAE/B;;;GAGG;AACH,eAAO,MAAM,2BAA2B,GACtC,QAAQ,CAAC,sBAAsB,GAAG;IAAC,OAAO,CAAC,EAAE,MAAM,CAAA;CAAC,CAAC,GAAG,SAAS,KAChE,GAAG,EAsBL,CAAC;AAEF;;;;;;;;GAQG;AACH,eAAO,MAAM,kBAAkB,GAAI,QAAQ,OAAO,EAAE,aAAa,GAAG,EAAE,KAAG,GAAG,GAAG,SAgC9E,CAAC;AAEF;;;;;;;;;;;;GAYG;AACH,eAAO,MAAM,4BAA4B,GACvC,QAAQ,OAAO,EACf,QAAQ,MAAM,EACd,MAAM,OAAO,EACb,SAAS,MAAM,GAAG,SAAS,KAC1B,GAAG,GAAG,SAuCR,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@thunderid/node",
3
- "version": "1.16.1",
3
+ "version": "1.17.0",
4
4
  "description": "Node.js runtime SDK for ThunderID",
5
5
  "keywords": [
6
6
  "thunderid",
@@ -44,7 +44,7 @@
44
44
  "vitest": "4.1.11"
45
45
  },
46
46
  "dependencies": {
47
- "@thunderid/javascript": "^1.19.1",
47
+ "@thunderid/javascript": "^1.20.0",
48
48
  "base64url": "3.0.1",
49
49
  "cross-fetch": "4.1.0",
50
50
  "fast-sha256": "1.3.0",