@thunderid/javascript 1.0.7 → 1.2.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/dist/IsomorphicCrypto.d.ts +18 -0
- package/dist/IsomorphicCrypto.d.ts.map +1 -1
- package/dist/StorageManager.d.ts +1 -0
- package/dist/StorageManager.d.ts.map +1 -1
- package/dist/ThunderIDJavaScriptClient.d.ts +6 -0
- package/dist/ThunderIDJavaScriptClient.d.ts.map +1 -1
- package/dist/api/agents/createAgent.d.ts +28 -0
- package/dist/api/agents/createAgent.d.ts.map +1 -0
- package/dist/api/agents/deleteAgent.d.ts +27 -0
- package/dist/api/agents/deleteAgent.d.ts.map +1 -0
- package/dist/api/agents/getAgent.d.ts +28 -0
- package/dist/api/agents/getAgent.d.ts.map +1 -0
- package/dist/api/agents/getAgents.d.ts +23 -0
- package/dist/api/agents/getAgents.d.ts.map +1 -0
- package/dist/api/agents/updateAgent.d.ts +33 -0
- package/dist/api/agents/updateAgent.d.ts.map +1 -0
- package/dist/api/applications/createApplication.d.ts +28 -0
- package/dist/api/applications/createApplication.d.ts.map +1 -0
- package/dist/api/applications/deleteApplication.d.ts +27 -0
- package/dist/api/applications/deleteApplication.d.ts.map +1 -0
- package/dist/api/applications/getApplication.d.ts +28 -0
- package/dist/api/applications/getApplication.d.ts.map +1 -0
- package/dist/api/applications/getApplications.d.ts +24 -0
- package/dist/api/applications/getApplications.d.ts.map +1 -0
- package/dist/api/applications/updateApplication.d.ts +33 -0
- package/dist/api/applications/updateApplication.d.ts.map +1 -0
- package/dist/api/updateMeCredentials.d.ts +66 -0
- package/dist/api/updateMeCredentials.d.ts.map +1 -0
- package/dist/api/users/createUser.d.ts +28 -0
- package/dist/api/users/createUser.d.ts.map +1 -0
- package/dist/api/users/deleteUser.d.ts +27 -0
- package/dist/api/users/deleteUser.d.ts.map +1 -0
- package/dist/api/users/getUser.d.ts +28 -0
- package/dist/api/users/getUser.d.ts.map +1 -0
- package/dist/api/users/getUsers.d.ts +24 -0
- package/dist/api/users/getUsers.d.ts.map +1 -0
- package/dist/api/users/updateUser.d.ts +33 -0
- package/dist/api/users/updateUser.d.ts.map +1 -0
- package/dist/cjs/index.cjs +1175 -7
- package/dist/constants/AgentQueryKeys.d.ts +10 -0
- package/dist/constants/AgentQueryKeys.d.ts.map +1 -0
- package/dist/constants/ApplicationQueryKeys.d.ts +10 -0
- package/dist/constants/ApplicationQueryKeys.d.ts.map +1 -0
- package/dist/constants/BackchannelLogoutConstants.d.ts +13 -0
- package/dist/constants/BackchannelLogoutConstants.d.ts.map +1 -0
- package/dist/constants/CredentialConstants.d.ts +22 -0
- package/dist/constants/CredentialConstants.d.ts.map +1 -0
- package/dist/constants/UserQueryKeys.d.ts +10 -0
- package/dist/constants/UserQueryKeys.d.ts.map +1 -0
- package/dist/edge/index.js +1142 -8
- package/dist/errors/exception.d.ts +7 -0
- package/dist/errors/exception.d.ts.map +1 -1
- package/dist/i18n/models/i18n.d.ts +14 -0
- package/dist/i18n/models/i18n.d.ts.map +1 -1
- package/dist/i18n/translations/en-US.d.ts.map +1 -1
- package/dist/i18n/translations/fr-FR.d.ts.map +1 -1
- package/dist/i18n/translations/hi-IN.d.ts.map +1 -1
- package/dist/i18n/translations/ja-JP.d.ts.map +1 -1
- package/dist/i18n/translations/pt-BR.d.ts.map +1 -1
- package/dist/i18n/translations/pt-PT.d.ts.map +1 -1
- package/dist/i18n/translations/si-LK.d.ts.map +1 -1
- package/dist/i18n/translations/ta-IN.d.ts.map +1 -1
- package/dist/i18n/translations/te-IN.d.ts.map +1 -1
- package/dist/index.d.ts +55 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1142 -8
- package/dist/models/agent-resource.d.ts +96 -0
- package/dist/models/agent-resource.d.ts.map +1 -0
- package/dist/models/api.d.ts +57 -0
- package/dist/models/api.d.ts.map +1 -0
- package/dist/models/application.d.ts +271 -0
- package/dist/models/application.d.ts.map +1 -0
- package/dist/models/config.d.ts +26 -1
- package/dist/models/config.d.ts.map +1 -1
- package/dist/models/embedded-flow.d.ts +14 -1
- package/dist/models/embedded-flow.d.ts.map +1 -1
- package/dist/models/embedded-signup-flow.d.ts +4 -0
- package/dist/models/embedded-signup-flow.d.ts.map +1 -1
- package/dist/models/logout-token.d.ts +58 -0
- package/dist/models/logout-token.d.ts.map +1 -0
- package/dist/models/managed-user.d.ts +44 -0
- package/dist/models/managed-user.d.ts.map +1 -0
- package/dist/utils/AuthenticationHelper.d.ts +31 -0
- package/dist/utils/AuthenticationHelper.d.ts.map +1 -1
- package/dist/utils/evaluateChangePasswordForm.d.ts +64 -0
- package/dist/utils/evaluateChangePasswordForm.d.ts.map +1 -0
- package/dist/utils/evaluatePasswordPolicy.d.ts +60 -0
- package/dist/utils/evaluatePasswordPolicy.d.ts.map +1 -0
- package/dist/utils/mapCredentialUpdateError.d.ts +31 -0
- package/dist/utils/mapCredentialUpdateError.d.ts.map +1 -0
- package/dist/utils/parseKeyValuePairs.d.ts +21 -0
- package/dist/utils/parseKeyValuePairs.d.ts.map +1 -0
- package/dist/utils/requestManagementResource.d.ts +41 -0
- package/dist/utils/requestManagementResource.d.ts.map +1 -0
- package/dist/utils/resolveChangeCredentialPolicy.d.ts +24 -0
- package/dist/utils/resolveChangeCredentialPolicy.d.ts.map +1 -0
- package/dist/utils/resolveResourceEndpoint.d.ts +1 -1
- package/dist/utils/resolveResourceEndpoint.d.ts.map +1 -1
- package/dist/utils/supportsCredential.d.ts +32 -0
- package/dist/utils/supportsCredential.d.ts.map +1 -0
- package/dist/utils/validateLogoutTokenClaims.d.ts +15 -0
- package/dist/utils/validateLogoutTokenClaims.d.ts.map +1 -0
- package/package.json +2 -2
package/dist/cjs/index.cjs
CHANGED
|
@@ -81,6 +81,15 @@ var ThunderIDAuthException = class extends Error {
|
|
|
81
81
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
82
82
|
}
|
|
83
83
|
};
|
|
84
|
+
/**
|
|
85
|
+
* Raised when a back-channel logout token is not valid. A logout handler answers 400 for this and a
|
|
86
|
+
* 5xx for any other failure, which tells the server whether a retry can help.
|
|
87
|
+
*/
|
|
88
|
+
var InvalidLogoutTokenError = class extends ThunderIDAuthException {
|
|
89
|
+
constructor(code, message) {
|
|
90
|
+
super(code, "Invalid logout token.", message);
|
|
91
|
+
}
|
|
92
|
+
};
|
|
84
93
|
|
|
85
94
|
//#endregion
|
|
86
95
|
//#region src/IsomorphicCrypto.ts
|
|
@@ -144,6 +153,38 @@ var IsomorphicCrypto = class {
|
|
|
144
153
|
return Promise.reject(new ThunderIDAuthException("JS-CRYPTO_HELPER-IVIT-IV01", "Invalid ID token.", "ID token validation returned false"));
|
|
145
154
|
}).catch((error$1) => Promise.reject(error$1));
|
|
146
155
|
}
|
|
156
|
+
/**
|
|
157
|
+
* Verifies the signature of a back-channel logout token, along with its audience, issuer,
|
|
158
|
+
* lifetime and, when the token has one, subject.
|
|
159
|
+
*
|
|
160
|
+
* @param logoutToken - The logout token received from the server.
|
|
161
|
+
* @param jwk - The server key the token names.
|
|
162
|
+
* @param clientId - The client the token must be addressed to.
|
|
163
|
+
* @param issuer - The expected issuer.
|
|
164
|
+
* @param subject - The token's subject, when it has one.
|
|
165
|
+
* @param clockTolerance - Allowed clock difference in seconds.
|
|
166
|
+
*
|
|
167
|
+
* @throws {InvalidLogoutTokenError} When verification fails. The message never includes the token.
|
|
168
|
+
*/
|
|
169
|
+
async verifyLogoutTokenSignature(logoutToken, jwk, clientId, issuer, subject, clockTolerance) {
|
|
170
|
+
let verified = false;
|
|
171
|
+
try {
|
|
172
|
+
verified = await this.cryptoUtils.verifyJwt(logoutToken, jwk, TokenConstants_default.SignatureValidation.SUPPORTED_ALGORITHMS, clientId, issuer, subject, clockTolerance, true);
|
|
173
|
+
} catch {
|
|
174
|
+
verified = false;
|
|
175
|
+
}
|
|
176
|
+
if (!verified) throw new InvalidLogoutTokenError("JS-CRYPTO_HELPER-VLTS-IV01", "The logout token signature could not be verified.");
|
|
177
|
+
}
|
|
178
|
+
/**
|
|
179
|
+
* Decodes the JOSE header of a JWT without verifying its signature.
|
|
180
|
+
*/
|
|
181
|
+
decodeJwtHeader(token) {
|
|
182
|
+
try {
|
|
183
|
+
return JSON.parse(this.cryptoUtils.base64URLDecode(token?.split(".")[0]));
|
|
184
|
+
} catch {
|
|
185
|
+
throw new ThunderIDAuthException("JS-CRYPTO_UTIL-DJH-IV01", "Decoding token failed.", "The token header could not be decoded.");
|
|
186
|
+
}
|
|
187
|
+
}
|
|
147
188
|
decodeJwtToken(token) {
|
|
148
189
|
try {
|
|
149
190
|
const utf8String = this.cryptoUtils.base64URLDecode(token?.split(".")[1]);
|
|
@@ -1032,6 +1073,8 @@ let EmbeddedFlowComponentType = /* @__PURE__ */ function(EmbeddedFlowComponentTy
|
|
|
1032
1073
|
EmbeddedFlowComponentType$1["Icon"] = "ICON";
|
|
1033
1074
|
/** Image display component for logos and illustrations */
|
|
1034
1075
|
EmbeddedFlowComponentType$1["Image"] = "IMAGE";
|
|
1076
|
+
/** Key-value list display component that shows label and value pairs published in additionalData */
|
|
1077
|
+
EmbeddedFlowComponentType$1["KeyValueList"] = "KEY_VALUE_LIST";
|
|
1035
1078
|
/** One-time password input field for multi-factor authentication */
|
|
1036
1079
|
EmbeddedFlowComponentType$1["OtpInput"] = "OTP_INPUT";
|
|
1037
1080
|
/** Organization unit tree picker for selecting an OU */
|
|
@@ -1465,6 +1508,73 @@ const getUsersMeMeta = async ({ baseUrl, fetcher, url,...requestConfig }) => {
|
|
|
1465
1508
|
};
|
|
1466
1509
|
var getUsersMeMeta_default = getUsersMeMeta;
|
|
1467
1510
|
|
|
1511
|
+
//#endregion
|
|
1512
|
+
//#region src/api/updateMeCredentials.ts
|
|
1513
|
+
/**
|
|
1514
|
+
* Updates one or more of the signed-in user's credentials at the
|
|
1515
|
+
* /users/me/update-credentials endpoint.
|
|
1516
|
+
*
|
|
1517
|
+
* The endpoint responds with `204 No Content` on success, so this function resolves with
|
|
1518
|
+
* `void` rather than a parsed body.
|
|
1519
|
+
*
|
|
1520
|
+
* @param config - Configuration object with URL, payload and optional request config.
|
|
1521
|
+
* @returns A promise that resolves once the credentials have been updated.
|
|
1522
|
+
* @example
|
|
1523
|
+
* ```typescript
|
|
1524
|
+
* // Using default fetch
|
|
1525
|
+
* await updateMeCredentials({
|
|
1526
|
+
* url: "https://localhost:8090/users/me/update-credentials",
|
|
1527
|
+
* payload: {password: "n3wP@ssword!"}
|
|
1528
|
+
* });
|
|
1529
|
+
* ```
|
|
1530
|
+
*
|
|
1531
|
+
* @example
|
|
1532
|
+
* ```typescript
|
|
1533
|
+
* // Using custom fetcher (e.g. an httpClient that attaches the access token)
|
|
1534
|
+
* await updateMeCredentials({
|
|
1535
|
+
* baseUrl: "https://localhost:8090",
|
|
1536
|
+
* payload: {password: "n3wP@ssword!"},
|
|
1537
|
+
* fetcher: async (url, config) => {
|
|
1538
|
+
* const response = await httpClient({url, method: config.method, headers: config.headers, data: config.body});
|
|
1539
|
+
* return {
|
|
1540
|
+
* ok: response.status >= 200 && response.status < 300,
|
|
1541
|
+
* status: response.status,
|
|
1542
|
+
* statusText: response.statusText,
|
|
1543
|
+
* json: () => Promise.resolve(response.data),
|
|
1544
|
+
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
1545
|
+
* } as Response;
|
|
1546
|
+
* }
|
|
1547
|
+
* });
|
|
1548
|
+
* ```
|
|
1549
|
+
*/
|
|
1550
|
+
const updateMeCredentials = async ({ url, baseUrl, payload, fetcher,...requestConfig }) => {
|
|
1551
|
+
try {
|
|
1552
|
+
new URL(url ?? baseUrl);
|
|
1553
|
+
} catch (error$1) {
|
|
1554
|
+
throw new ThunderIDAPIError(`Invalid URL provided. ${error$1 instanceof Error ? error$1.message : String(error$1)}`, "updateMeCredentials-ValidationError-001", "javascript", 400, "The provided `url` or `baseUrl` path does not adhere to the URL schema.");
|
|
1555
|
+
}
|
|
1556
|
+
const fetchFn = fetcher ?? fetch;
|
|
1557
|
+
const resolvedUrl = url ?? `${baseUrl?.replace(/\/$/, "")}/users/me/update-credentials`;
|
|
1558
|
+
const requestInit = {
|
|
1559
|
+
...requestConfig,
|
|
1560
|
+
method: "POST",
|
|
1561
|
+
body: JSON.stringify({ attributes: payload }),
|
|
1562
|
+
headers: {
|
|
1563
|
+
...requestConfig.headers,
|
|
1564
|
+
Accept: "application/json",
|
|
1565
|
+
"Content-Type": "application/json"
|
|
1566
|
+
}
|
|
1567
|
+
};
|
|
1568
|
+
try {
|
|
1569
|
+
const response = await fetchFn(resolvedUrl, requestInit);
|
|
1570
|
+
if (!response?.ok) throw new ThunderIDAPIError(await response.text(), "updateMeCredentials-ResponseError-001", "javascript", response.status, response.statusText, "Failed to update user credentials");
|
|
1571
|
+
} catch (error$1) {
|
|
1572
|
+
if (error$1 instanceof ThunderIDAPIError) throw error$1;
|
|
1573
|
+
throw new ThunderIDAPIError(`Network or parsing error: ${error$1 instanceof Error ? error$1.message : "Unknown error"}`, "updateMeCredentials-NetworkError-001", "javascript", 0, "Network Error");
|
|
1574
|
+
}
|
|
1575
|
+
};
|
|
1576
|
+
var updateMeCredentials_default = updateMeCredentials;
|
|
1577
|
+
|
|
1468
1578
|
//#endregion
|
|
1469
1579
|
//#region src/api/updateMeProfile.ts
|
|
1470
1580
|
/**
|
|
@@ -1542,6 +1652,456 @@ const updateMeProfile = async ({ url, baseUrl, payload, fetcher,...requestConfig
|
|
|
1542
1652
|
};
|
|
1543
1653
|
var updateMeProfile_default = updateMeProfile;
|
|
1544
1654
|
|
|
1655
|
+
//#endregion
|
|
1656
|
+
//#region src/utils/requestManagementResource.ts
|
|
1657
|
+
/**
|
|
1658
|
+
* Performs a request against a management API resource and maps failures onto
|
|
1659
|
+
* {@link ThunderIDAPIError}. HTTP 403 and 404 get their own codes so a caller can tell a missing
|
|
1660
|
+
* permission from a missing resource.
|
|
1661
|
+
*
|
|
1662
|
+
* @returns The parsed JSON body, or `undefined` when the server returns no content.
|
|
1663
|
+
*/
|
|
1664
|
+
const requestManagementResource = async ({ baseUrl, url, fetcher,...requestConfig }, { body, collection, failureMessage, id, method, operation, query }) => {
|
|
1665
|
+
try {
|
|
1666
|
+
new URL(url ?? baseUrl);
|
|
1667
|
+
} catch (error$1) {
|
|
1668
|
+
throw new ThunderIDAPIError(`Invalid URL provided. ${error$1 instanceof Error ? error$1.message : String(error$1)}`, `${operation}-ValidationError-001`, "javascript", 400, "The provided `url` or `baseUrl` path does not adhere to the URL schema.");
|
|
1669
|
+
}
|
|
1670
|
+
if (id?.trim() === "") throw new ThunderIDAPIError("A resource identifier is required.", `${operation}-ValidationError-002`, "javascript", 400, "The provided resource identifier is empty.");
|
|
1671
|
+
const collectionUrl = (url ?? `${baseUrl}/${collection}`).replace(/\/+$/, "");
|
|
1672
|
+
const resourceUrl = id === void 0 ? collectionUrl : `${collectionUrl}/${encodeURIComponent(id)}`;
|
|
1673
|
+
const searchParams = new URLSearchParams();
|
|
1674
|
+
Object.entries(query ?? {}).forEach(([key, value]) => {
|
|
1675
|
+
if (value !== void 0) searchParams.set(key, String(value));
|
|
1676
|
+
});
|
|
1677
|
+
const queryString = searchParams.toString();
|
|
1678
|
+
const resolvedUrl = queryString ? `${resourceUrl}?${queryString}` : resourceUrl;
|
|
1679
|
+
const requestInit = {
|
|
1680
|
+
...requestConfig,
|
|
1681
|
+
headers: {
|
|
1682
|
+
Accept: "application/json",
|
|
1683
|
+
"Content-Type": "application/json",
|
|
1684
|
+
...requestConfig.headers
|
|
1685
|
+
},
|
|
1686
|
+
method,
|
|
1687
|
+
...body !== void 0 ? { body: JSON.stringify(body) } : {}
|
|
1688
|
+
};
|
|
1689
|
+
const fetchFn = fetcher ?? fetch;
|
|
1690
|
+
try {
|
|
1691
|
+
const response = await fetchFn(resolvedUrl, requestInit);
|
|
1692
|
+
if (!response?.ok) {
|
|
1693
|
+
const errorText = await response.text();
|
|
1694
|
+
let reason = "ResponseError";
|
|
1695
|
+
if (response.status === 403) reason = "ForbiddenError";
|
|
1696
|
+
else if (response.status === 404) reason = "NotFoundError";
|
|
1697
|
+
throw new ThunderIDAPIError(errorText, `${operation}-${reason}-001`, "javascript", response.status, response.statusText, failureMessage);
|
|
1698
|
+
}
|
|
1699
|
+
if (response.status === 204 || method === "DELETE") return;
|
|
1700
|
+
return await response.json();
|
|
1701
|
+
} catch (error$1) {
|
|
1702
|
+
if (error$1 instanceof ThunderIDAPIError) throw error$1;
|
|
1703
|
+
throw new ThunderIDAPIError(`Network or parsing error: ${error$1 instanceof Error ? error$1.message : "Unknown error"}`, `${operation}-NetworkError-001`, "javascript", 0, "Network Error");
|
|
1704
|
+
}
|
|
1705
|
+
};
|
|
1706
|
+
var requestManagementResource_default = requestManagementResource;
|
|
1707
|
+
|
|
1708
|
+
//#endregion
|
|
1709
|
+
//#region src/api/applications/getApplications.ts
|
|
1710
|
+
/**
|
|
1711
|
+
* Retrieves a page of applications.
|
|
1712
|
+
*
|
|
1713
|
+
* @param config - Request configuration object.
|
|
1714
|
+
* @returns A promise that resolves with the page of applications.
|
|
1715
|
+
*
|
|
1716
|
+
* @example
|
|
1717
|
+
* ```typescript
|
|
1718
|
+
* const {applications, totalResults} = await getApplications({
|
|
1719
|
+
* baseUrl: 'https://localhost:8090',
|
|
1720
|
+
* limit: 10,
|
|
1721
|
+
* offset: 0,
|
|
1722
|
+
* });
|
|
1723
|
+
* ```
|
|
1724
|
+
*/
|
|
1725
|
+
const getApplications = async ({ limit, offset,...config }) => requestManagementResource_default(config, {
|
|
1726
|
+
collection: "applications",
|
|
1727
|
+
failureMessage: "Failed to fetch applications",
|
|
1728
|
+
method: "GET",
|
|
1729
|
+
operation: "getApplications",
|
|
1730
|
+
query: {
|
|
1731
|
+
limit,
|
|
1732
|
+
offset
|
|
1733
|
+
}
|
|
1734
|
+
});
|
|
1735
|
+
var getApplications_default = getApplications;
|
|
1736
|
+
|
|
1737
|
+
//#endregion
|
|
1738
|
+
//#region src/api/applications/getApplication.ts
|
|
1739
|
+
/**
|
|
1740
|
+
* Retrieves a single application.
|
|
1741
|
+
*
|
|
1742
|
+
* @param config - Request configuration object.
|
|
1743
|
+
* @returns A promise that resolves with the application.
|
|
1744
|
+
*
|
|
1745
|
+
* @example
|
|
1746
|
+
* ```typescript
|
|
1747
|
+
* const application = await getApplication({
|
|
1748
|
+
* baseUrl: 'https://localhost:8090',
|
|
1749
|
+
* applicationId: '550e8400-e29b-41d4-a716-446655440000',
|
|
1750
|
+
* });
|
|
1751
|
+
* ```
|
|
1752
|
+
*/
|
|
1753
|
+
const getApplication = async ({ applicationId,...config }) => requestManagementResource_default(config, {
|
|
1754
|
+
collection: "applications",
|
|
1755
|
+
failureMessage: "Failed to fetch application",
|
|
1756
|
+
id: applicationId,
|
|
1757
|
+
method: "GET",
|
|
1758
|
+
operation: "getApplication"
|
|
1759
|
+
});
|
|
1760
|
+
var getApplication_default = getApplication;
|
|
1761
|
+
|
|
1762
|
+
//#endregion
|
|
1763
|
+
//#region src/api/applications/createApplication.ts
|
|
1764
|
+
/**
|
|
1765
|
+
* Creates an application.
|
|
1766
|
+
*
|
|
1767
|
+
* @param config - Request configuration object.
|
|
1768
|
+
* @returns A promise that resolves with the application as the server stored it.
|
|
1769
|
+
*
|
|
1770
|
+
* @example
|
|
1771
|
+
* ```typescript
|
|
1772
|
+
* const application = await createApplication({
|
|
1773
|
+
* baseUrl: 'https://localhost:8090',
|
|
1774
|
+
* payload: {name: 'My SPA', url: 'http://localhost:3000'},
|
|
1775
|
+
* });
|
|
1776
|
+
* ```
|
|
1777
|
+
*/
|
|
1778
|
+
const createApplication = async ({ payload,...config }) => requestManagementResource_default(config, {
|
|
1779
|
+
body: payload,
|
|
1780
|
+
collection: "applications",
|
|
1781
|
+
failureMessage: "Failed to create application",
|
|
1782
|
+
method: "POST",
|
|
1783
|
+
operation: "createApplication"
|
|
1784
|
+
});
|
|
1785
|
+
var createApplication_default = createApplication;
|
|
1786
|
+
|
|
1787
|
+
//#endregion
|
|
1788
|
+
//#region src/api/applications/updateApplication.ts
|
|
1789
|
+
/**
|
|
1790
|
+
* Updates an application.
|
|
1791
|
+
*
|
|
1792
|
+
* @param config - Request configuration object.
|
|
1793
|
+
* @returns A promise that resolves with the updated application.
|
|
1794
|
+
*
|
|
1795
|
+
* @example
|
|
1796
|
+
* ```typescript
|
|
1797
|
+
* const application = await updateApplication({
|
|
1798
|
+
* baseUrl: 'https://localhost:8090',
|
|
1799
|
+
* applicationId: '550e8400-e29b-41d4-a716-446655440000',
|
|
1800
|
+
* payload: {...existing, name: 'Renamed'},
|
|
1801
|
+
* });
|
|
1802
|
+
* ```
|
|
1803
|
+
*/
|
|
1804
|
+
const updateApplication = async ({ applicationId, payload,...config }) => requestManagementResource_default(config, {
|
|
1805
|
+
body: payload,
|
|
1806
|
+
collection: "applications",
|
|
1807
|
+
failureMessage: "Failed to update application",
|
|
1808
|
+
id: applicationId,
|
|
1809
|
+
method: "PUT",
|
|
1810
|
+
operation: "updateApplication"
|
|
1811
|
+
});
|
|
1812
|
+
var updateApplication_default = updateApplication;
|
|
1813
|
+
|
|
1814
|
+
//#endregion
|
|
1815
|
+
//#region src/api/applications/deleteApplication.ts
|
|
1816
|
+
/**
|
|
1817
|
+
* Deletes an application.
|
|
1818
|
+
*
|
|
1819
|
+
* @param config - Request configuration object.
|
|
1820
|
+
* @returns A promise that resolves once the application is deleted.
|
|
1821
|
+
*
|
|
1822
|
+
* @example
|
|
1823
|
+
* ```typescript
|
|
1824
|
+
* await deleteApplication({
|
|
1825
|
+
* baseUrl: 'https://localhost:8090',
|
|
1826
|
+
* applicationId: '550e8400-e29b-41d4-a716-446655440000',
|
|
1827
|
+
* });
|
|
1828
|
+
* ```
|
|
1829
|
+
*/
|
|
1830
|
+
const deleteApplication = async ({ applicationId,...config }) => requestManagementResource_default(config, {
|
|
1831
|
+
collection: "applications",
|
|
1832
|
+
failureMessage: "Failed to delete application",
|
|
1833
|
+
id: applicationId,
|
|
1834
|
+
method: "DELETE",
|
|
1835
|
+
operation: "deleteApplication"
|
|
1836
|
+
});
|
|
1837
|
+
var deleteApplication_default = deleteApplication;
|
|
1838
|
+
|
|
1839
|
+
//#endregion
|
|
1840
|
+
//#region src/api/users/getUsers.ts
|
|
1841
|
+
/**
|
|
1842
|
+
* Retrieves a page of users. Each user carries its resolved `display` value.
|
|
1843
|
+
*
|
|
1844
|
+
* @param config - Request configuration object.
|
|
1845
|
+
* @returns A promise that resolves with the page of users.
|
|
1846
|
+
*
|
|
1847
|
+
* @example
|
|
1848
|
+
* ```typescript
|
|
1849
|
+
* const {users, totalResults} = await getUsers({
|
|
1850
|
+
* baseUrl: 'https://localhost:8090',
|
|
1851
|
+
* limit: 10,
|
|
1852
|
+
* filter: 'username eq "alice"',
|
|
1853
|
+
* });
|
|
1854
|
+
* ```
|
|
1855
|
+
*/
|
|
1856
|
+
const getUsers = async ({ filter, limit, offset,...config }) => requestManagementResource_default(config, {
|
|
1857
|
+
collection: "users",
|
|
1858
|
+
failureMessage: "Failed to fetch users",
|
|
1859
|
+
method: "GET",
|
|
1860
|
+
operation: "getUsers",
|
|
1861
|
+
query: {
|
|
1862
|
+
filter,
|
|
1863
|
+
include: "display",
|
|
1864
|
+
limit,
|
|
1865
|
+
offset
|
|
1866
|
+
}
|
|
1867
|
+
});
|
|
1868
|
+
var getUsers_default = getUsers;
|
|
1869
|
+
|
|
1870
|
+
//#endregion
|
|
1871
|
+
//#region src/api/users/getUser.ts
|
|
1872
|
+
/**
|
|
1873
|
+
* Retrieves a single user, with its resolved `display` value.
|
|
1874
|
+
*
|
|
1875
|
+
* @param config - Request configuration object.
|
|
1876
|
+
* @returns A promise that resolves with the user.
|
|
1877
|
+
*
|
|
1878
|
+
* @example
|
|
1879
|
+
* ```typescript
|
|
1880
|
+
* const user = await getUser({
|
|
1881
|
+
* baseUrl: 'https://localhost:8090',
|
|
1882
|
+
* userId: '9a475e1e-b0cb-4b29-8df5-2e5b24fb0ed3',
|
|
1883
|
+
* });
|
|
1884
|
+
* ```
|
|
1885
|
+
*/
|
|
1886
|
+
const getUser = async ({ userId,...config }) => requestManagementResource_default(config, {
|
|
1887
|
+
collection: "users",
|
|
1888
|
+
failureMessage: "Failed to fetch user",
|
|
1889
|
+
id: userId,
|
|
1890
|
+
method: "GET",
|
|
1891
|
+
operation: "getUser",
|
|
1892
|
+
query: { include: "display" }
|
|
1893
|
+
});
|
|
1894
|
+
var getUser_default = getUser;
|
|
1895
|
+
|
|
1896
|
+
//#endregion
|
|
1897
|
+
//#region src/api/users/createUser.ts
|
|
1898
|
+
/**
|
|
1899
|
+
* Creates a user.
|
|
1900
|
+
*
|
|
1901
|
+
* @param config - Request configuration object.
|
|
1902
|
+
* @returns A promise that resolves with the user as the server stored it.
|
|
1903
|
+
*
|
|
1904
|
+
* @example
|
|
1905
|
+
* ```typescript
|
|
1906
|
+
* const user = await createUser({
|
|
1907
|
+
* baseUrl: 'https://localhost:8090',
|
|
1908
|
+
* payload: {ouId, type: 'customer', attributes: {username: 'alice'}},
|
|
1909
|
+
* });
|
|
1910
|
+
* ```
|
|
1911
|
+
*/
|
|
1912
|
+
const createUser = async ({ payload,...config }) => requestManagementResource_default(config, {
|
|
1913
|
+
body: payload,
|
|
1914
|
+
collection: "users",
|
|
1915
|
+
failureMessage: "Failed to create user",
|
|
1916
|
+
method: "POST",
|
|
1917
|
+
operation: "createUser"
|
|
1918
|
+
});
|
|
1919
|
+
var createUser_default = createUser;
|
|
1920
|
+
|
|
1921
|
+
//#endregion
|
|
1922
|
+
//#region src/api/users/updateUser.ts
|
|
1923
|
+
/**
|
|
1924
|
+
* Updates a user.
|
|
1925
|
+
*
|
|
1926
|
+
* @param config - Request configuration object.
|
|
1927
|
+
* @returns A promise that resolves with the updated user.
|
|
1928
|
+
*
|
|
1929
|
+
* @example
|
|
1930
|
+
* ```typescript
|
|
1931
|
+
* const user = await updateUser({
|
|
1932
|
+
* baseUrl: 'https://localhost:8090',
|
|
1933
|
+
* userId: '9a475e1e-b0cb-4b29-8df5-2e5b24fb0ed3',
|
|
1934
|
+
* payload: {attributes: {givenName: 'Alice'}},
|
|
1935
|
+
* });
|
|
1936
|
+
* ```
|
|
1937
|
+
*/
|
|
1938
|
+
const updateUser = async ({ userId, payload,...config }) => requestManagementResource_default(config, {
|
|
1939
|
+
body: payload,
|
|
1940
|
+
collection: "users",
|
|
1941
|
+
failureMessage: "Failed to update user",
|
|
1942
|
+
id: userId,
|
|
1943
|
+
method: "PUT",
|
|
1944
|
+
operation: "updateUser"
|
|
1945
|
+
});
|
|
1946
|
+
var updateUser_default = updateUser;
|
|
1947
|
+
|
|
1948
|
+
//#endregion
|
|
1949
|
+
//#region src/api/users/deleteUser.ts
|
|
1950
|
+
/**
|
|
1951
|
+
* Deletes a user.
|
|
1952
|
+
*
|
|
1953
|
+
* @param config - Request configuration object.
|
|
1954
|
+
* @returns A promise that resolves once the user is deleted.
|
|
1955
|
+
*
|
|
1956
|
+
* @example
|
|
1957
|
+
* ```typescript
|
|
1958
|
+
* await deleteUser({
|
|
1959
|
+
* baseUrl: 'https://localhost:8090',
|
|
1960
|
+
* userId: '9a475e1e-b0cb-4b29-8df5-2e5b24fb0ed3',
|
|
1961
|
+
* });
|
|
1962
|
+
* ```
|
|
1963
|
+
*/
|
|
1964
|
+
const deleteUser = async ({ userId,...config }) => requestManagementResource_default(config, {
|
|
1965
|
+
collection: "users",
|
|
1966
|
+
failureMessage: "Failed to delete user",
|
|
1967
|
+
id: userId,
|
|
1968
|
+
method: "DELETE",
|
|
1969
|
+
operation: "deleteUser"
|
|
1970
|
+
});
|
|
1971
|
+
var deleteUser_default = deleteUser;
|
|
1972
|
+
|
|
1973
|
+
//#endregion
|
|
1974
|
+
//#region src/api/agents/getAgents.ts
|
|
1975
|
+
/**
|
|
1976
|
+
* Retrieves a page of agents.
|
|
1977
|
+
*
|
|
1978
|
+
* @param config - Request configuration object.
|
|
1979
|
+
* @returns A promise that resolves with the page of agents.
|
|
1980
|
+
*
|
|
1981
|
+
* @example
|
|
1982
|
+
* ```typescript
|
|
1983
|
+
* const {agents, totalResults} = await getAgents({
|
|
1984
|
+
* baseUrl: 'https://localhost:8090',
|
|
1985
|
+
* limit: 10,
|
|
1986
|
+
* });
|
|
1987
|
+
* ```
|
|
1988
|
+
*/
|
|
1989
|
+
const getAgents = async ({ limit, offset,...config }) => requestManagementResource_default(config, {
|
|
1990
|
+
collection: "agents",
|
|
1991
|
+
failureMessage: "Failed to fetch agents",
|
|
1992
|
+
method: "GET",
|
|
1993
|
+
operation: "getAgents",
|
|
1994
|
+
query: {
|
|
1995
|
+
include: "display",
|
|
1996
|
+
limit,
|
|
1997
|
+
offset
|
|
1998
|
+
}
|
|
1999
|
+
});
|
|
2000
|
+
var getAgents_default = getAgents;
|
|
2001
|
+
|
|
2002
|
+
//#endregion
|
|
2003
|
+
//#region src/api/agents/getAgent.ts
|
|
2004
|
+
/**
|
|
2005
|
+
* Retrieves a single agent.
|
|
2006
|
+
*
|
|
2007
|
+
* @param config - Request configuration object.
|
|
2008
|
+
* @returns A promise that resolves with the agent.
|
|
2009
|
+
*
|
|
2010
|
+
* @example
|
|
2011
|
+
* ```typescript
|
|
2012
|
+
* const agent = await getAgent({
|
|
2013
|
+
* baseUrl: 'https://localhost:8090',
|
|
2014
|
+
* agentId: '6f1e2d3c-4b5a-4978-8a6b-5c4d3e2f1a0b',
|
|
2015
|
+
* });
|
|
2016
|
+
* ```
|
|
2017
|
+
*/
|
|
2018
|
+
const getAgent = async ({ agentId,...config }) => requestManagementResource_default(config, {
|
|
2019
|
+
collection: "agents",
|
|
2020
|
+
failureMessage: "Failed to fetch agent",
|
|
2021
|
+
id: agentId,
|
|
2022
|
+
method: "GET",
|
|
2023
|
+
operation: "getAgent",
|
|
2024
|
+
query: { include: "display" }
|
|
2025
|
+
});
|
|
2026
|
+
var getAgent_default = getAgent;
|
|
2027
|
+
|
|
2028
|
+
//#endregion
|
|
2029
|
+
//#region src/api/agents/createAgent.ts
|
|
2030
|
+
/**
|
|
2031
|
+
* Creates an agent.
|
|
2032
|
+
*
|
|
2033
|
+
* @param config - Request configuration object.
|
|
2034
|
+
* @returns A promise that resolves with the agent as the server stored it.
|
|
2035
|
+
*
|
|
2036
|
+
* @example
|
|
2037
|
+
* ```typescript
|
|
2038
|
+
* const agent = await createAgent({
|
|
2039
|
+
* baseUrl: 'https://localhost:8090',
|
|
2040
|
+
* payload: {ouId, type: 'default', name: 'Nightly Sync Worker'},
|
|
2041
|
+
* });
|
|
2042
|
+
* ```
|
|
2043
|
+
*/
|
|
2044
|
+
const createAgent = async ({ payload,...config }) => requestManagementResource_default(config, {
|
|
2045
|
+
body: payload,
|
|
2046
|
+
collection: "agents",
|
|
2047
|
+
failureMessage: "Failed to create agent",
|
|
2048
|
+
method: "POST",
|
|
2049
|
+
operation: "createAgent"
|
|
2050
|
+
});
|
|
2051
|
+
var createAgent_default = createAgent;
|
|
2052
|
+
|
|
2053
|
+
//#endregion
|
|
2054
|
+
//#region src/api/agents/updateAgent.ts
|
|
2055
|
+
/**
|
|
2056
|
+
* Updates an agent.
|
|
2057
|
+
*
|
|
2058
|
+
* @param config - Request configuration object.
|
|
2059
|
+
* @returns A promise that resolves with the updated agent.
|
|
2060
|
+
*
|
|
2061
|
+
* @example
|
|
2062
|
+
* ```typescript
|
|
2063
|
+
* const agent = await updateAgent({
|
|
2064
|
+
* baseUrl: 'https://localhost:8090',
|
|
2065
|
+
* agentId: '6f1e2d3c-4b5a-4978-8a6b-5c4d3e2f1a0b',
|
|
2066
|
+
* payload: {name: 'Renamed Agent'},
|
|
2067
|
+
* });
|
|
2068
|
+
* ```
|
|
2069
|
+
*/
|
|
2070
|
+
const updateAgent = async ({ agentId, payload,...config }) => requestManagementResource_default(config, {
|
|
2071
|
+
body: payload,
|
|
2072
|
+
collection: "agents",
|
|
2073
|
+
failureMessage: "Failed to update agent",
|
|
2074
|
+
id: agentId,
|
|
2075
|
+
method: "PUT",
|
|
2076
|
+
operation: "updateAgent"
|
|
2077
|
+
});
|
|
2078
|
+
var updateAgent_default = updateAgent;
|
|
2079
|
+
|
|
2080
|
+
//#endregion
|
|
2081
|
+
//#region src/api/agents/deleteAgent.ts
|
|
2082
|
+
/**
|
|
2083
|
+
* Deletes an agent.
|
|
2084
|
+
*
|
|
2085
|
+
* @param config - Request configuration object.
|
|
2086
|
+
* @returns A promise that resolves once the agent is deleted.
|
|
2087
|
+
*
|
|
2088
|
+
* @example
|
|
2089
|
+
* ```typescript
|
|
2090
|
+
* await deleteAgent({
|
|
2091
|
+
* baseUrl: 'https://localhost:8090',
|
|
2092
|
+
* agentId: '6f1e2d3c-4b5a-4978-8a6b-5c4d3e2f1a0b',
|
|
2093
|
+
* });
|
|
2094
|
+
* ```
|
|
2095
|
+
*/
|
|
2096
|
+
const deleteAgent = async ({ agentId,...config }) => requestManagementResource_default(config, {
|
|
2097
|
+
collection: "agents",
|
|
2098
|
+
failureMessage: "Failed to delete agent",
|
|
2099
|
+
id: agentId,
|
|
2100
|
+
method: "DELETE",
|
|
2101
|
+
operation: "deleteAgent"
|
|
2102
|
+
});
|
|
2103
|
+
var deleteAgent_default = deleteAgent;
|
|
2104
|
+
|
|
1545
2105
|
//#endregion
|
|
1546
2106
|
//#region src/constants/ApplicationNativeAuthenticationConstants.ts
|
|
1547
2107
|
/**
|
|
@@ -1565,6 +2125,21 @@ const ApplicationNativeAuthenticationConstants = { SupportedAuthenticators: {
|
|
|
1565
2125
|
} };
|
|
1566
2126
|
var ApplicationNativeAuthenticationConstants_default = ApplicationNativeAuthenticationConstants;
|
|
1567
2127
|
|
|
2128
|
+
//#endregion
|
|
2129
|
+
//#region src/constants/BackchannelLogoutConstants.ts
|
|
2130
|
+
/**
|
|
2131
|
+
* Constants for OpenID Connect Back-Channel Logout 1.0, for an SDK that receives logout tokens.
|
|
2132
|
+
*/
|
|
2133
|
+
const BackchannelLogoutConstants = {
|
|
2134
|
+
DEFAULT_CLOCK_TOLERANCE_SECONDS: 60,
|
|
2135
|
+
EVENT: "http://schemas.openid.net/event/backchannel-logout",
|
|
2136
|
+
JWKS_CACHE_TTL_MS: 6e5,
|
|
2137
|
+
JWKS_MIN_REFETCH_INTERVAL_MS: 3e4,
|
|
2138
|
+
TOKEN_PARAM: "logout_token",
|
|
2139
|
+
TOKEN_TYPE: "logout+jwt"
|
|
2140
|
+
};
|
|
2141
|
+
var BackchannelLogoutConstants_default = BackchannelLogoutConstants;
|
|
2142
|
+
|
|
1568
2143
|
//#endregion
|
|
1569
2144
|
//#region src/constants/ScopeConstants.ts
|
|
1570
2145
|
/**
|
|
@@ -1625,6 +2200,28 @@ var OIDCRequestConstants_default = OIDCRequestConstants;
|
|
|
1625
2200
|
const VendorConstants = { VENDOR_PREFIX: "thunderid" };
|
|
1626
2201
|
var VendorConstants_default = VendorConstants;
|
|
1627
2202
|
|
|
2203
|
+
//#endregion
|
|
2204
|
+
//#region src/constants/CredentialConstants.ts
|
|
2205
|
+
/**
|
|
2206
|
+
* Constants for the credential types the server accepts on the self-service
|
|
2207
|
+
* credential write path.
|
|
2208
|
+
*
|
|
2209
|
+
* The server keys credentials by type. `password` is the one every user type schema
|
|
2210
|
+
* declares by default, hence a named constant for it; any other schema-declared
|
|
2211
|
+
* `credential: true` attribute (for example `pin`) can be self-managed too, just by its
|
|
2212
|
+
* own attribute name rather than a constant here.
|
|
2213
|
+
*
|
|
2214
|
+
* @example
|
|
2215
|
+
* ```typescript
|
|
2216
|
+
* await updateMeCredentials({
|
|
2217
|
+
* payload: {[CredentialConstants.PASSWORD]: newPassword},
|
|
2218
|
+
* url,
|
|
2219
|
+
* });
|
|
2220
|
+
* ```
|
|
2221
|
+
*/
|
|
2222
|
+
const CredentialConstants = { PASSWORD: "password" };
|
|
2223
|
+
var CredentialConstants_default = CredentialConstants;
|
|
2224
|
+
|
|
1628
2225
|
//#endregion
|
|
1629
2226
|
//#region src/constants/ConsentConstants.ts
|
|
1630
2227
|
/**
|
|
@@ -1649,6 +2246,42 @@ const ConsentConstants = {
|
|
|
1649
2246
|
};
|
|
1650
2247
|
var ConsentConstants_default = ConsentConstants;
|
|
1651
2248
|
|
|
2249
|
+
//#endregion
|
|
2250
|
+
//#region src/constants/ApplicationQueryKeys.ts
|
|
2251
|
+
/**
|
|
2252
|
+
* Cache keys for application resources. The SDK's reactive wrappers use them to refetch after a
|
|
2253
|
+
* mutation, and an application can reuse them as keys in its own data fetching cache.
|
|
2254
|
+
*/
|
|
2255
|
+
const ApplicationQueryKeys = {
|
|
2256
|
+
APPLICATION: "application",
|
|
2257
|
+
APPLICATIONS: "applications"
|
|
2258
|
+
};
|
|
2259
|
+
var ApplicationQueryKeys_default = ApplicationQueryKeys;
|
|
2260
|
+
|
|
2261
|
+
//#endregion
|
|
2262
|
+
//#region src/constants/UserQueryKeys.ts
|
|
2263
|
+
/**
|
|
2264
|
+
* Cache keys for user resources. The SDK's reactive wrappers use them to refetch after a mutation,
|
|
2265
|
+
* and an application can reuse them as keys in its own data fetching cache.
|
|
2266
|
+
*/
|
|
2267
|
+
const UserQueryKeys = {
|
|
2268
|
+
USER: "user",
|
|
2269
|
+
USERS: "users"
|
|
2270
|
+
};
|
|
2271
|
+
var UserQueryKeys_default = UserQueryKeys;
|
|
2272
|
+
|
|
2273
|
+
//#endregion
|
|
2274
|
+
//#region src/constants/AgentQueryKeys.ts
|
|
2275
|
+
/**
|
|
2276
|
+
* Cache keys for agent resources. The SDK's reactive wrappers use them to refetch after a mutation,
|
|
2277
|
+
* and an application can reuse them as keys in its own data fetching cache.
|
|
2278
|
+
*/
|
|
2279
|
+
const AgentQueryKeys = {
|
|
2280
|
+
AGENT: "agent",
|
|
2281
|
+
AGENTS: "agents"
|
|
2282
|
+
};
|
|
2283
|
+
var AgentQueryKeys_default = AgentQueryKeys;
|
|
2284
|
+
|
|
1652
2285
|
//#endregion
|
|
1653
2286
|
//#region src/errors/ThunderIDRuntimeError.ts
|
|
1654
2287
|
/**
|
|
@@ -1775,6 +2408,51 @@ let FlowMode = /* @__PURE__ */ function(FlowMode$1) {
|
|
|
1775
2408
|
return FlowMode$1;
|
|
1776
2409
|
}({});
|
|
1777
2410
|
|
|
2411
|
+
//#endregion
|
|
2412
|
+
//#region src/models/application.ts
|
|
2413
|
+
/**
|
|
2414
|
+
* OAuth 2.0 grant type values.
|
|
2415
|
+
*/
|
|
2416
|
+
const OAuth2GrantTypes = {
|
|
2417
|
+
AUTHORIZATION_CODE: "authorization_code",
|
|
2418
|
+
CIBA: "urn:openid:params:grant-type:ciba",
|
|
2419
|
+
CLIENT_CREDENTIALS: "client_credentials",
|
|
2420
|
+
IMPLICIT: "implicit",
|
|
2421
|
+
JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
|
2422
|
+
PASSWORD: "password",
|
|
2423
|
+
REFRESH_TOKEN: "refresh_token",
|
|
2424
|
+
TOKEN_EXCHANGE: "urn:ietf:params:oauth:grant-type:token-exchange"
|
|
2425
|
+
};
|
|
2426
|
+
/**
|
|
2427
|
+
* Grant types that can issue a refresh token.
|
|
2428
|
+
*/
|
|
2429
|
+
const REFRESH_TOKEN_ISSUING_GRANTS = [OAuth2GrantTypes.AUTHORIZATION_CODE, OAuth2GrantTypes.CIBA];
|
|
2430
|
+
/**
|
|
2431
|
+
* OAuth 2.0 response type values.
|
|
2432
|
+
*/
|
|
2433
|
+
const OAuth2ResponseTypes = {
|
|
2434
|
+
CODE: "code",
|
|
2435
|
+
CODE_ID_TOKEN: "code id_token",
|
|
2436
|
+
CODE_TOKEN: "code token",
|
|
2437
|
+
ID_TOKEN: "id_token",
|
|
2438
|
+
TOKEN: "token",
|
|
2439
|
+
TOKEN_ID_TOKEN: "token id_token"
|
|
2440
|
+
};
|
|
2441
|
+
/**
|
|
2442
|
+
* Token endpoint authentication methods an application can be configured with.
|
|
2443
|
+
*/
|
|
2444
|
+
const TokenEndpointAuthMethods = {
|
|
2445
|
+
CLIENT_SECRET_BASIC: "client_secret_basic",
|
|
2446
|
+
CLIENT_SECRET_JWT: "client_secret_jwt",
|
|
2447
|
+
CLIENT_SECRET_POST: "client_secret_post",
|
|
2448
|
+
NONE: "none",
|
|
2449
|
+
PRIVATE_KEY_JWT: "private_key_jwt"
|
|
2450
|
+
};
|
|
2451
|
+
/**
|
|
2452
|
+
* Inbound authentication protocol values.
|
|
2453
|
+
*/
|
|
2454
|
+
const InboundAuthTypes = { OAUTH2: "oauth2" };
|
|
2455
|
+
|
|
1778
2456
|
//#endregion
|
|
1779
2457
|
//#region src/models/field.ts
|
|
1780
2458
|
let FieldType = /* @__PURE__ */ function(FieldType$1) {
|
|
@@ -2100,6 +2778,9 @@ var StorageManager = class StorageManager {
|
|
|
2100
2778
|
async getCustomData(key, userId) {
|
|
2101
2779
|
return JSON.parse(await this.store.getData(this.resolveKey(key, userId)) ?? null);
|
|
2102
2780
|
}
|
|
2781
|
+
async removeCustomData(key, userId) {
|
|
2782
|
+
await this.store.removeData(this.resolveKey(key, userId));
|
|
2783
|
+
}
|
|
2103
2784
|
setSessionStatus(status) {
|
|
2104
2785
|
if (StorageManager.isLocalStorageAvailable()) localStorage.setItem(`${this.vendor}-session-active`, status);
|
|
2105
2786
|
}
|
|
@@ -2300,9 +2981,13 @@ var processOpenIDScopes_default = processOpenIDScopes;
|
|
|
2300
2981
|
* endpoints. Used to keep these overrides out of the resolved OIDC provider metadata.
|
|
2301
2982
|
*/
|
|
2302
2983
|
const RESOURCE_ENDPOINT_KEYS = [
|
|
2984
|
+
"agents",
|
|
2985
|
+
"applications",
|
|
2303
2986
|
"flowExecute",
|
|
2304
2987
|
"flowMeta",
|
|
2988
|
+
"users",
|
|
2305
2989
|
"usersMe",
|
|
2990
|
+
"usersMeCredentials",
|
|
2306
2991
|
"usersMeMeta"
|
|
2307
2992
|
];
|
|
2308
2993
|
/**
|
|
@@ -2330,6 +3015,47 @@ const RESOURCE_ENDPOINT_KEYS = [
|
|
|
2330
3015
|
const resolveResourceEndpoint = (key, config, explicitUrl) => explicitUrl ?? config?.endpoints?.[key] ?? void 0;
|
|
2331
3016
|
var resolveResourceEndpoint_default = resolveResourceEndpoint;
|
|
2332
3017
|
|
|
3018
|
+
//#endregion
|
|
3019
|
+
//#region src/utils/validateLogoutTokenClaims.ts
|
|
3020
|
+
const fail = (code, message) => {
|
|
3021
|
+
throw new InvalidLogoutTokenError(code, message);
|
|
3022
|
+
};
|
|
3023
|
+
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3024
|
+
const isNonEmptyString = (value) => typeof value === "string" && value.length > 0;
|
|
3025
|
+
/**
|
|
3026
|
+
* Checks the header and claims of a back-channel logout token, per OpenID Connect Back-Channel
|
|
3027
|
+
* Logout 1.0 section 2.6. It does not verify the signature: the caller does that with the server's
|
|
3028
|
+
* keys. Messages never include the token or its claim values.
|
|
3029
|
+
*
|
|
3030
|
+
* @param header - The decoded JOSE header.
|
|
3031
|
+
* @param payload - The decoded claims.
|
|
3032
|
+
* @param options - The issuer, client and clock the claims are checked against.
|
|
3033
|
+
* @returns The claims, typed.
|
|
3034
|
+
* @throws {InvalidLogoutTokenError} When any check fails.
|
|
3035
|
+
*/
|
|
3036
|
+
const validateLogoutTokenClaims = (header, payload, options) => {
|
|
3037
|
+
if (!isRecord(header) || !isRecord(payload)) return fail("JS-LOGOUT_TOKEN-VLTC-IV01", "The logout token is not a well-formed JWT.");
|
|
3038
|
+
const type = typeof header["typ"] === "string" ? header["typ"].toLowerCase() : "";
|
|
3039
|
+
if (type !== BackchannelLogoutConstants_default.TOKEN_TYPE && type !== `application/${BackchannelLogoutConstants_default.TOKEN_TYPE}`) return fail("JS-LOGOUT_TOKEN-VLTC-IV02", "The token type is not logout+jwt.");
|
|
3040
|
+
if (typeof header["alg"] !== "string" || !options.supportedAlgorithms.includes(header["alg"])) return fail("JS-LOGOUT_TOKEN-VLTC-IV03", "The signature algorithm is not supported.");
|
|
3041
|
+
if ("nonce" in payload) return fail("JS-LOGOUT_TOKEN-VLTC-IV04", "A logout token must not carry a nonce.");
|
|
3042
|
+
const { events } = payload;
|
|
3043
|
+
if (!isRecord(events) || !isRecord(events[BackchannelLogoutConstants_default.EVENT])) return fail("JS-LOGOUT_TOKEN-VLTC-IV05", "The back-channel logout event is missing.");
|
|
3044
|
+
if (payload["iss"] !== options.issuer) return fail("JS-LOGOUT_TOKEN-VLTC-IV06", "The issuer does not match.");
|
|
3045
|
+
const audiences = Array.isArray(payload["aud"]) ? payload["aud"] : [payload["aud"]];
|
|
3046
|
+
if (!isNonEmptyString(options.clientId) || !audiences.includes(options.clientId)) return fail("JS-LOGOUT_TOKEN-VLTC-IV07", "The audience does not include this client.");
|
|
3047
|
+
const now = options.now ?? Math.floor(Date.now() / 1e3);
|
|
3048
|
+
const tolerance = options.clockTolerance ?? BackchannelLogoutConstants_default.DEFAULT_CLOCK_TOLERANCE_SECONDS;
|
|
3049
|
+
if (typeof payload["iat"] !== "number" || payload["iat"] > now + tolerance) return fail("JS-LOGOUT_TOKEN-VLTC-IV08", "The issued-at time is missing or in the future.");
|
|
3050
|
+
if (typeof payload["exp"] !== "number" || payload["exp"] <= now - tolerance) return fail("JS-LOGOUT_TOKEN-VLTC-IV09", "The token has expired.");
|
|
3051
|
+
if ("sid" in payload && !isNonEmptyString(payload["sid"])) return fail("JS-LOGOUT_TOKEN-VLTC-IV10", "The session identifier is not valid.");
|
|
3052
|
+
if ("sub" in payload && !isNonEmptyString(payload["sub"])) return fail("JS-LOGOUT_TOKEN-VLTC-IV10", "The subject is not valid.");
|
|
3053
|
+
if (!("sid" in payload) && !("sub" in payload)) return fail("JS-LOGOUT_TOKEN-VLTC-IV11", "The token names neither a session nor a subject.");
|
|
3054
|
+
if (!isNonEmptyString(payload["jti"])) return fail("JS-LOGOUT_TOKEN-VLTC-IV12", "The token identifier is missing.");
|
|
3055
|
+
return payload;
|
|
3056
|
+
};
|
|
3057
|
+
var validateLogoutTokenClaims_default = validateLogoutTokenClaims;
|
|
3058
|
+
|
|
2333
3059
|
//#endregion
|
|
2334
3060
|
//#region src/constants/TokenExchangeConstants.ts
|
|
2335
3061
|
/**
|
|
@@ -2370,6 +3096,9 @@ var AuthenticationHelper = class {
|
|
|
2370
3096
|
config;
|
|
2371
3097
|
oidcProviderMetaData;
|
|
2372
3098
|
cryptoHelper;
|
|
3099
|
+
jwksCache;
|
|
3100
|
+
jwksFetch;
|
|
3101
|
+
jwksFetchStartedAt = 0;
|
|
2373
3102
|
/**
|
|
2374
3103
|
* Creates a new `AuthenticationHelper` instance.
|
|
2375
3104
|
*
|
|
@@ -2474,6 +3203,83 @@ var AuthenticationHelper = class {
|
|
|
2474
3203
|
* @throws {ThunderIDAuthException} When the JWKS endpoint is missing or the request fails.
|
|
2475
3204
|
*/
|
|
2476
3205
|
async validateIdToken(idToken) {
|
|
3206
|
+
const keys = await this.fetchJwks();
|
|
3207
|
+
const { issuer } = await this.oidcProviderMetaData();
|
|
3208
|
+
const jwk = await this.cryptoHelper.getJWKForTheIdToken(idToken.split(".")[0], keys);
|
|
3209
|
+
return this.cryptoHelper.isValidIdToken(idToken, jwk, (await this.config()).clientId ?? "", issuer ?? "", this.cryptoHelper.decodeJwtToken(idToken).sub, (await this.config()).tokenValidation?.idToken?.clockTolerance, (await this.config()).tokenValidation?.idToken?.validateIssuer ?? true);
|
|
3210
|
+
}
|
|
3211
|
+
/**
|
|
3212
|
+
* Validates a back-channel logout token: its type, event, issuer, audience and lifetime, then its
|
|
3213
|
+
* signature against the server's keys. The claims are checked first, so a malformed token costs
|
|
3214
|
+
* neither a key fetch nor a signature check.
|
|
3215
|
+
*
|
|
3216
|
+
* @param logoutToken - The raw `logout_token` the server posted.
|
|
3217
|
+
* @returns The token's claims.
|
|
3218
|
+
* @throws {InvalidLogoutTokenError} When the token is not valid.
|
|
3219
|
+
*/
|
|
3220
|
+
async validateLogoutToken(logoutToken) {
|
|
3221
|
+
const malformed = new InvalidLogoutTokenError("JS-AUTH_HELPER-VLT-IV01", "The logout token is not a signed JWT.");
|
|
3222
|
+
if (typeof logoutToken !== "string" || logoutToken.split(".").length !== 3) throw malformed;
|
|
3223
|
+
const configData = await this.config();
|
|
3224
|
+
const { issuer } = await this.oidcProviderMetaData();
|
|
3225
|
+
const clockTolerance = configData.tokenValidation?.idToken?.clockTolerance ?? BackchannelLogoutConstants_default.DEFAULT_CLOCK_TOLERANCE_SECONDS;
|
|
3226
|
+
let header;
|
|
3227
|
+
let payload;
|
|
3228
|
+
try {
|
|
3229
|
+
header = this.cryptoHelper.decodeJwtHeader(logoutToken);
|
|
3230
|
+
payload = this.cryptoHelper.decodeJwtToken(logoutToken);
|
|
3231
|
+
} catch {
|
|
3232
|
+
throw malformed;
|
|
3233
|
+
}
|
|
3234
|
+
const claims = validateLogoutTokenClaims_default(header, payload, {
|
|
3235
|
+
clientId: configData.clientId ?? "",
|
|
3236
|
+
clockTolerance,
|
|
3237
|
+
issuer: issuer ?? "",
|
|
3238
|
+
supportedAlgorithms: TokenConstants_default.SignatureValidation.SUPPORTED_ALGORITHMS
|
|
3239
|
+
});
|
|
3240
|
+
await this.cryptoHelper.verifyLogoutTokenSignature(logoutToken, await this.getCachedJwk(header["kid"]), configData.clientId ?? "", issuer ?? "", claims.sub, clockTolerance);
|
|
3241
|
+
return claims;
|
|
3242
|
+
}
|
|
3243
|
+
/**
|
|
3244
|
+
* Returns the server key with the given identifier from a cached key set. An unknown identifier
|
|
3245
|
+
* triggers one re-fetch, to follow key rotation, no more often than the minimum interval: the
|
|
3246
|
+
* logout endpoint is unauthenticated, so an unbounded re-fetch would let anyone drive requests
|
|
3247
|
+
* to the server. Requests that arrive while a fetch runs share it.
|
|
3248
|
+
*/
|
|
3249
|
+
async getCachedJwk(kid) {
|
|
3250
|
+
const now = Date.now();
|
|
3251
|
+
const find = (keys) => keys.find((key) => key.kid === kid);
|
|
3252
|
+
const fresh = this.jwksCache !== void 0 && now - this.jwksCache.fetchedAt < BackchannelLogoutConstants_default.JWKS_CACHE_TTL_MS;
|
|
3253
|
+
let jwk = fresh ? find(this.jwksCache.keys) : void 0;
|
|
3254
|
+
if (!jwk && (this.jwksFetch || now - this.jwksFetchStartedAt >= BackchannelLogoutConstants_default.JWKS_MIN_REFETCH_INTERVAL_MS)) jwk = find(await this.fetchJwksOnce());
|
|
3255
|
+
else if (!jwk && !fresh) throw new ThunderIDAuthException("JS-AUTH_HELPER-GCJ-NA02", "The server keys are not available.", "The server key set could not be fetched recently, and the cached one has expired.");
|
|
3256
|
+
if (!jwk) throw new InvalidLogoutTokenError("JS-AUTH_HELPER-GCJ-NF01", "The logout token names a key the server does not publish.");
|
|
3257
|
+
return jwk;
|
|
3258
|
+
}
|
|
3259
|
+
/**
|
|
3260
|
+
* Fetches the key set unless a fetch is already running, in which case that one is shared.
|
|
3261
|
+
*/
|
|
3262
|
+
fetchJwksOnce() {
|
|
3263
|
+
if (!this.jwksFetch) {
|
|
3264
|
+
this.jwksFetchStartedAt = Date.now();
|
|
3265
|
+
this.jwksFetch = this.fetchJwks().then((keys) => {
|
|
3266
|
+
this.jwksCache = {
|
|
3267
|
+
fetchedAt: Date.now(),
|
|
3268
|
+
keys
|
|
3269
|
+
};
|
|
3270
|
+
return keys;
|
|
3271
|
+
}).finally(() => {
|
|
3272
|
+
this.jwksFetch = void 0;
|
|
3273
|
+
});
|
|
3274
|
+
}
|
|
3275
|
+
return this.jwksFetch;
|
|
3276
|
+
}
|
|
3277
|
+
/**
|
|
3278
|
+
* Fetches the server's JSON Web Key Set.
|
|
3279
|
+
*
|
|
3280
|
+
* @throws {ThunderIDAuthException} When the JWKS endpoint is missing or the request fails.
|
|
3281
|
+
*/
|
|
3282
|
+
async fetchJwks() {
|
|
2477
3283
|
const jwksEndpoint = (await this.storageManager.loadOpenIDProviderConfiguration()).jwks_uri;
|
|
2478
3284
|
const configData = await this.config();
|
|
2479
3285
|
if (!jwksEndpoint || jwksEndpoint.trim().length === 0) throw new ThunderIDAuthException("JS_AUTH_HELPER-VIT-NF01", "JWKS endpoint not found.", "No JWKS endpoint was found in the OIDC provider meta data returned by the well-known endpoint or the JWKS endpoint passed to the SDK is empty.");
|
|
@@ -2484,10 +3290,8 @@ var AuthenticationHelper = class {
|
|
|
2484
3290
|
throw new ThunderIDAuthException("JS-AUTH_HELPER-VIT-NE02", "Request to jwks endpoint failed.", error$1 ?? "The request sent to get the jwks from the server failed.");
|
|
2485
3291
|
}
|
|
2486
3292
|
if (response.status !== 200 || !response.ok) throw new ThunderIDAuthException("JS-AUTH_HELPER-VIT-HE03", `Invalid response status received for jwks request (${response.statusText}).`, await response.json());
|
|
2487
|
-
const { issuer } = await this.oidcProviderMetaData();
|
|
2488
3293
|
const { keys } = await response.json();
|
|
2489
|
-
|
|
2490
|
-
return this.cryptoHelper.isValidIdToken(idToken, jwk, (await this.config()).clientId ?? "", issuer ?? "", this.cryptoHelper.decodeJwtToken(idToken).sub, (await this.config()).tokenValidation?.idToken?.clockTolerance, (await this.config()).tokenValidation?.idToken?.validateIssuer ?? true);
|
|
3294
|
+
return keys;
|
|
2491
3295
|
}
|
|
2492
3296
|
/**
|
|
2493
3297
|
* Extracts user information from a decoded ID token payload.
|
|
@@ -2892,6 +3696,14 @@ var ThunderIDJavaScriptClient = class {
|
|
|
2892
3696
|
async decodeJwtToken(token) {
|
|
2893
3697
|
return this.cryptoHelper.decodeJwtToken(token);
|
|
2894
3698
|
}
|
|
3699
|
+
/**
|
|
3700
|
+
* Validates a back-channel logout token and returns its claims. Protected, because only an SDK
|
|
3701
|
+
* that runs on a server can receive one; such an SDK builds its logout handler on this.
|
|
3702
|
+
*/
|
|
3703
|
+
async validateLogoutToken(logoutToken) {
|
|
3704
|
+
await this.loadOpenIDProviderConfiguration(false);
|
|
3705
|
+
return this.authHelper.validateLogoutToken(logoutToken);
|
|
3706
|
+
}
|
|
2895
3707
|
async exchangeToken(config, sessionId) {
|
|
2896
3708
|
if (!await this.storageManager.getTemporaryDataParameter(OIDCDiscoveryConstants_default.Storage.StorageKeys.OPENID_PROVIDER_CONFIG_INITIATED)) await this.loadOpenIDProviderConfiguration(false);
|
|
2897
3709
|
const oidcProviderMetadata = await this.oidcProviderMetaDataProvider();
|
|
@@ -4332,6 +5144,182 @@ const resolveFieldName = (field) => {
|
|
|
4332
5144
|
};
|
|
4333
5145
|
var resolveFieldName_default = resolveFieldName;
|
|
4334
5146
|
|
|
5147
|
+
//#endregion
|
|
5148
|
+
//#region src/utils/evaluatePasswordPolicy.ts
|
|
5149
|
+
/**
|
|
5150
|
+
* Evaluates a password against a policy, returning one result when the policy configures
|
|
5151
|
+
* a `regex` and none otherwise.
|
|
5152
|
+
*
|
|
5153
|
+
* An uncompilable `regex` is treated as passing, matching `evaluateValidationRule`:
|
|
5154
|
+
* the SDK stays lenient so a misconfigured schema cannot lock a user out of their own
|
|
5155
|
+
* password change.
|
|
5156
|
+
*
|
|
5157
|
+
* @param value - The candidate password.
|
|
5158
|
+
* @param policy - The rule to apply.
|
|
5159
|
+
* @returns A single-item list when `policy.regex` is set, otherwise an empty list.
|
|
5160
|
+
* @example
|
|
5161
|
+
* ```typescript
|
|
5162
|
+
* const results = evaluatePasswordPolicy('sh0rt', {regex: '^.{8,}$'});
|
|
5163
|
+
* const isValid = results.every(result => result.passed);
|
|
5164
|
+
* ```
|
|
5165
|
+
*/
|
|
5166
|
+
const evaluatePasswordPolicy = (value, policy) => {
|
|
5167
|
+
if (!policy.regex) return [];
|
|
5168
|
+
let matches = true;
|
|
5169
|
+
try {
|
|
5170
|
+
matches = new RegExp(policy.regex).test(value);
|
|
5171
|
+
} catch {
|
|
5172
|
+
matches = true;
|
|
5173
|
+
}
|
|
5174
|
+
return [{
|
|
5175
|
+
key: "regex",
|
|
5176
|
+
messageKey: "validation.password.pattern",
|
|
5177
|
+
passed: matches
|
|
5178
|
+
}];
|
|
5179
|
+
};
|
|
5180
|
+
var evaluatePasswordPolicy_default = evaluatePasswordPolicy;
|
|
5181
|
+
|
|
5182
|
+
//#endregion
|
|
5183
|
+
//#region src/utils/evaluateChangePasswordForm.ts
|
|
5184
|
+
/**
|
|
5185
|
+
* Evaluates a change-password form against a policy.
|
|
5186
|
+
*
|
|
5187
|
+
* Every predicate a change-password UI needs is derived here so the React and Vue
|
|
5188
|
+
* components stay pure rendering concerns and cannot drift apart on what counts as a
|
|
5189
|
+
* submittable form.
|
|
5190
|
+
*
|
|
5191
|
+
* @param values - The current field values.
|
|
5192
|
+
* @param policy - The rules the new password must satisfy.
|
|
5193
|
+
* @returns The derived flags plus the per-rule results.
|
|
5194
|
+
* @example
|
|
5195
|
+
* ```typescript
|
|
5196
|
+
* const {isValid, ruleResults} = evaluateChangePasswordForm(
|
|
5197
|
+
* {confirmPassword, newPassword},
|
|
5198
|
+
* {regex: '^.{12,}$'},
|
|
5199
|
+
* );
|
|
5200
|
+
* const canSubmit = !loading && isValid;
|
|
5201
|
+
* ```
|
|
5202
|
+
*/
|
|
5203
|
+
const evaluateChangePasswordForm = (values, policy) => {
|
|
5204
|
+
const { confirmPassword, newPassword } = values;
|
|
5205
|
+
const ruleResults = evaluatePasswordPolicy_default(newPassword, policy);
|
|
5206
|
+
const meetsPolicy = ruleResults.every((rule) => rule.passed);
|
|
5207
|
+
const confirmMatches = newPassword === confirmPassword;
|
|
5208
|
+
return {
|
|
5209
|
+
confirmMatches,
|
|
5210
|
+
isValid: newPassword !== "" && confirmPassword !== "" && meetsPolicy && confirmMatches,
|
|
5211
|
+
meetsPolicy,
|
|
5212
|
+
ruleResults
|
|
5213
|
+
};
|
|
5214
|
+
};
|
|
5215
|
+
var evaluateChangePasswordForm_default = evaluateChangePasswordForm;
|
|
5216
|
+
|
|
5217
|
+
//#endregion
|
|
5218
|
+
//#region src/utils/resolveChangeCredentialPolicy.ts
|
|
5219
|
+
/**
|
|
5220
|
+
* Resolves the rules a change-credential form should enforce for the given credential.
|
|
5221
|
+
*
|
|
5222
|
+
* The organization's own policy, expressed as the credential attribute's `regex` in
|
|
5223
|
+
* `GET /users/me/meta`, is the sole source of truth: the SDK does not layer its own
|
|
5224
|
+
* character-class or length rules on top, since doing so could reject a value the
|
|
5225
|
+
* organization's policy accepts. When the schema carries no regex for this credential,
|
|
5226
|
+
* there is no policy to check client-side and the requirement checklist is simply empty.
|
|
5227
|
+
*
|
|
5228
|
+
* @param userSchema - The user type schema resolved by the provider, keyed by attribute.
|
|
5229
|
+
* @param attribute - The credential attribute this form manages (e.g. `password`, `pin`).
|
|
5230
|
+
* @param override - An explicit policy supplied by the caller, which wins outright.
|
|
5231
|
+
* @returns The policy to hand to {@link evaluatePasswordPolicy}.
|
|
5232
|
+
* @example
|
|
5233
|
+
* ```typescript
|
|
5234
|
+
* const policy = resolveChangeCredentialPolicy(userSchema, 'pin', undefined);
|
|
5235
|
+
* const results = evaluatePasswordPolicy(candidate, policy);
|
|
5236
|
+
* ```
|
|
5237
|
+
*/
|
|
5238
|
+
const resolveChangeCredentialPolicy = (userSchema, attribute, override) => {
|
|
5239
|
+
if (override) return override;
|
|
5240
|
+
const schemaRegex = userSchema?.[attribute]?.regex;
|
|
5241
|
+
return schemaRegex ? { regex: schemaRegex } : {};
|
|
5242
|
+
};
|
|
5243
|
+
var resolveChangeCredentialPolicy_default = resolveChangeCredentialPolicy;
|
|
5244
|
+
|
|
5245
|
+
//#endregion
|
|
5246
|
+
//#region src/utils/supportsCredential.ts
|
|
5247
|
+
/**
|
|
5248
|
+
* Whether the signed-in user's type allows them to set the given credential for themselves.
|
|
5249
|
+
*
|
|
5250
|
+
* The user type schema from `GET /users/me/meta` is the only thing a client can check before
|
|
5251
|
+
* rendering. It says whether the credential is declared on this type at all, which is a property
|
|
5252
|
+
* of the type rather than of the account, so it cannot say whether this particular user has one
|
|
5253
|
+
* stored today. That second question is the server's to answer.
|
|
5254
|
+
*
|
|
5255
|
+
* Without this check the form would submit into a guaranteed failure. `POST
|
|
5256
|
+
* /users/me/update-credentials` rejects a write for a name not declared on the type, since the
|
|
5257
|
+
* entity layer only accepts schema-declared credential keys.
|
|
5258
|
+
*
|
|
5259
|
+
* An absent schema means the answer is not known yet, either because the profile is still loading
|
|
5260
|
+
* or because the consuming app never supplied one. Both resolve to `true` so a change-credential
|
|
5261
|
+
* affordance is never hidden on missing information alone, and so apps that do not wire up
|
|
5262
|
+
* `userSchema` keep the behaviour they had before this check existed.
|
|
5263
|
+
*
|
|
5264
|
+
* @param userSchema - The user type schema resolved by the provider, keyed by attribute.
|
|
5265
|
+
* @param attribute - The credential attribute to check (e.g. `password`, `pin`).
|
|
5266
|
+
* @returns `false` only when the schema is known and either defines no attribute named
|
|
5267
|
+
* `attribute` or defines one that isn't marked `credential: true`.
|
|
5268
|
+
* @example
|
|
5269
|
+
* ```typescript
|
|
5270
|
+
* if (!supportsCredential(userSchema, 'pin')) {
|
|
5271
|
+
* return null;
|
|
5272
|
+
* }
|
|
5273
|
+
* ```
|
|
5274
|
+
*/
|
|
5275
|
+
const supportsCredential = (userSchema, attribute) => {
|
|
5276
|
+
if (!userSchema) return true;
|
|
5277
|
+
return userSchema[attribute]?.credential === true;
|
|
5278
|
+
};
|
|
5279
|
+
var supportsCredential_default = supportsCredential;
|
|
5280
|
+
|
|
5281
|
+
//#endregion
|
|
5282
|
+
//#region src/utils/mapCredentialUpdateError.ts
|
|
5283
|
+
/**
|
|
5284
|
+
* Maps a failure from the credential write path onto the field that caused it.
|
|
5285
|
+
*
|
|
5286
|
+
* `400` is the new password failing a server-side check. Everything else, including a
|
|
5287
|
+
* `403`, has no single field to blame here: this form collects no current-value field for
|
|
5288
|
+
* a `403` to attach to, since the server does not verify one on this path today.
|
|
5289
|
+
*
|
|
5290
|
+
* @param error - The value thrown by the credential update call.
|
|
5291
|
+
* @returns Where to show the failure and what to show.
|
|
5292
|
+
* @example
|
|
5293
|
+
* ```typescript
|
|
5294
|
+
* const {field, message, messageKey} = mapCredentialUpdateError(caughtError);
|
|
5295
|
+
* const text = message ?? t(messageKey);
|
|
5296
|
+
*
|
|
5297
|
+
* if (field) {
|
|
5298
|
+
* setFieldErrors({[field]: text});
|
|
5299
|
+
* } else {
|
|
5300
|
+
* setError(text);
|
|
5301
|
+
* }
|
|
5302
|
+
* ```
|
|
5303
|
+
*/
|
|
5304
|
+
const GENERIC_MESSAGE_KEY = "user.change_password.generic.error";
|
|
5305
|
+
const mapCredentialUpdateError = (error$1) => {
|
|
5306
|
+
if ((error$1 instanceof ThunderIDAPIError ? error$1.statusCode : void 0) === 400 && error$1 instanceof ThunderIDError) return {
|
|
5307
|
+
field: "newPassword",
|
|
5308
|
+
message: error$1.message,
|
|
5309
|
+
messageKey: GENERIC_MESSAGE_KEY
|
|
5310
|
+
};
|
|
5311
|
+
if (error$1 instanceof ThunderIDError) return {
|
|
5312
|
+
field: null,
|
|
5313
|
+
message: error$1.message,
|
|
5314
|
+
messageKey: GENERIC_MESSAGE_KEY
|
|
5315
|
+
};
|
|
5316
|
+
return {
|
|
5317
|
+
field: null,
|
|
5318
|
+
messageKey: GENERIC_MESSAGE_KEY
|
|
5319
|
+
};
|
|
5320
|
+
};
|
|
5321
|
+
var mapCredentialUpdateError_default = mapCredentialUpdateError;
|
|
5322
|
+
|
|
4335
5323
|
//#endregion
|
|
4336
5324
|
//#region src/utils/resolveMeta.ts
|
|
4337
5325
|
/**
|
|
@@ -4524,6 +5512,40 @@ function resolveFlowTemplateLiterals(text, { t, meta }) {
|
|
|
4524
5512
|
});
|
|
4525
5513
|
}
|
|
4526
5514
|
|
|
5515
|
+
//#endregion
|
|
5516
|
+
//#region src/utils/parseKeyValuePairs.ts
|
|
5517
|
+
/**
|
|
5518
|
+
* Reads the label and value pairs a KEY_VALUE_LIST renders from the raw value found under its
|
|
5519
|
+
* `source` key in `additionalData`. The server publishes them as a JSON-encoded array, since
|
|
5520
|
+
* additional data carries strings, so both an array and its encoding are accepted.
|
|
5521
|
+
*
|
|
5522
|
+
* Entries that are not objects, or that carry no value, are dropped, since an empty row tells the
|
|
5523
|
+
* user nothing. Anything that is not a list of pairs yields none.
|
|
5524
|
+
*
|
|
5525
|
+
* @param raw - The raw value found under the source key.
|
|
5526
|
+
* @returns The pairs to render, empty when the value holds none.
|
|
5527
|
+
*
|
|
5528
|
+
* @example
|
|
5529
|
+
* ```typescript
|
|
5530
|
+
* parseKeyValuePairs('[{"label":"Email","value":"a@b.com"}]'); // [{label: 'Email', value: 'a@b.com'}]
|
|
5531
|
+
* parseKeyValuePairs('not json'); // []
|
|
5532
|
+
* ```
|
|
5533
|
+
*/
|
|
5534
|
+
const parseKeyValuePairs = (raw) => {
|
|
5535
|
+
let parsed = raw;
|
|
5536
|
+
if (typeof raw === "string") try {
|
|
5537
|
+
parsed = JSON.parse(raw);
|
|
5538
|
+
} catch {
|
|
5539
|
+
return [];
|
|
5540
|
+
}
|
|
5541
|
+
if (!Array.isArray(parsed)) return [];
|
|
5542
|
+
return parsed.filter((entry) => typeof entry === "object" && entry !== null && !Array.isArray(entry)).map((entry) => ({
|
|
5543
|
+
label: typeof entry["label"] === "string" ? entry["label"] : "",
|
|
5544
|
+
value: typeof entry["value"] === "string" ? entry["value"] : ""
|
|
5545
|
+
})).filter((pair) => pair.value !== "");
|
|
5546
|
+
};
|
|
5547
|
+
var parseKeyValuePairs_default = parseKeyValuePairs;
|
|
5548
|
+
|
|
4527
5549
|
//#endregion
|
|
4528
5550
|
//#region src/utils/countryCodeToFlagEmoji.ts
|
|
4529
5551
|
/**
|
|
@@ -4718,7 +5740,7 @@ const DEFAULT_VALIDATION_MESSAGE_KEYS = {
|
|
|
4718
5740
|
* - Unknown rule types are treated as passing (forward compatibility with future types).
|
|
4719
5741
|
*/
|
|
4720
5742
|
const evaluateValidationRule = (rule, value) => {
|
|
4721
|
-
const fail = () => rule.message ?? DEFAULT_VALIDATION_MESSAGE_KEYS[rule.type];
|
|
5743
|
+
const fail$1 = () => rule.message ?? DEFAULT_VALIDATION_MESSAGE_KEYS[rule.type];
|
|
4722
5744
|
switch (rule.type) {
|
|
4723
5745
|
case "regex": {
|
|
4724
5746
|
if (typeof rule.value !== "string" || rule.value === "") return null;
|
|
@@ -4728,14 +5750,14 @@ const evaluateValidationRule = (rule, value) => {
|
|
|
4728
5750
|
} catch {
|
|
4729
5751
|
return null;
|
|
4730
5752
|
}
|
|
4731
|
-
return re.test(value) ? null : fail();
|
|
5753
|
+
return re.test(value) ? null : fail$1();
|
|
4732
5754
|
}
|
|
4733
5755
|
case "minLength":
|
|
4734
5756
|
if (typeof rule.value !== "number" || Number.isNaN(rule.value)) return null;
|
|
4735
|
-
return value.length >= rule.value ? null : fail();
|
|
5757
|
+
return value.length >= rule.value ? null : fail$1();
|
|
4736
5758
|
case "maxLength":
|
|
4737
5759
|
if (typeof rule.value !== "number" || Number.isNaN(rule.value)) return null;
|
|
4738
|
-
return value.length <= rule.value ? null : fail();
|
|
5760
|
+
return value.length <= rule.value ? null : fail$1();
|
|
4739
5761
|
default: return null;
|
|
4740
5762
|
}
|
|
4741
5763
|
};
|
|
@@ -4965,6 +5987,19 @@ const en_US = {
|
|
|
4965
5987
|
"passkey.register.description": "Create a passkey to securely sign in to your account without a password.",
|
|
4966
5988
|
"user.profile.heading": "Profile",
|
|
4967
5989
|
"user.profile.update.generic.error": "An error occurred while updating your profile. Please try again.",
|
|
5990
|
+
"user.change_password.heading": "Change {credential}",
|
|
5991
|
+
"user.change_password.new.label": "New {credential}",
|
|
5992
|
+
"user.change_password.new.placeholder": "Enter your new {credentialLower}",
|
|
5993
|
+
"user.change_password.confirm.label": "Confirm New {credential}",
|
|
5994
|
+
"user.change_password.confirm.placeholder": "Re-enter your new {credentialLower}",
|
|
5995
|
+
"user.change_password.requirements.heading": "Your {credentialLower} must have:",
|
|
5996
|
+
"user.change_password.submit": "Update {credential}",
|
|
5997
|
+
"user.change_password.success": "Your {credentialLower} has been updated.",
|
|
5998
|
+
"user.change_password.mismatch.error": "{credential}s do not match.",
|
|
5999
|
+
"user.change_password.generic.error": "An error occurred while updating your {credentialLower}. Please try again.",
|
|
6000
|
+
"user.change_password.unavailable.heading": "{credential} changes unavailable",
|
|
6001
|
+
"user.change_password.unavailable.description": "Please contact your administrator.",
|
|
6002
|
+
"validation.password.pattern": "Matches the required format",
|
|
4968
6003
|
"organization.switcher.switch.organization": "Switch Organization",
|
|
4969
6004
|
"organization.switcher.loading.placeholder.organizations": "Loading organizations...",
|
|
4970
6005
|
"organization.switcher.members": "members",
|
|
@@ -5008,6 +6043,7 @@ const en_US = {
|
|
|
5008
6043
|
"errors.signup.initialization": "An error occurred while initializing. Please try again later.",
|
|
5009
6044
|
"errors.signup.flow.failure": "An error occurred during the sign-up flow. Please try again later.",
|
|
5010
6045
|
"errors.signup.flow.initialization.failure": "An error occurred while initializing the sign-up flow. Please try again later.",
|
|
6046
|
+
"errors.signup.popup.failure": "Could not continue the sign-up in the pop-up window. Please try again.",
|
|
5011
6047
|
"errors.signup.components.not.available": "Sign-up form is not available at the moment. Please try again later."
|
|
5012
6048
|
}
|
|
5013
6049
|
};
|
|
@@ -5086,6 +6122,19 @@ const fr_FR = {
|
|
|
5086
6122
|
"passkey.register.description": "Créez une clé d'accès pour vous connecter en toute sécurité à votre compte sans mot de passe.",
|
|
5087
6123
|
"user.profile.heading": "Profil",
|
|
5088
6124
|
"user.profile.update.generic.error": "Une erreur est survenue lors de la mise à jour de votre profil. Veuillez réessayer.",
|
|
6125
|
+
"user.change_password.heading": "Modifier {credential}",
|
|
6126
|
+
"user.change_password.new.label": "Nouveau {credential}",
|
|
6127
|
+
"user.change_password.new.placeholder": "Entrez votre nouveau {credentialLower}",
|
|
6128
|
+
"user.change_password.confirm.label": "Confirmer le nouveau {credential}",
|
|
6129
|
+
"user.change_password.confirm.placeholder": "Saisissez à nouveau votre nouveau {credentialLower}",
|
|
6130
|
+
"user.change_password.requirements.heading": "Votre {credentialLower} doit contenir :",
|
|
6131
|
+
"user.change_password.submit": "Mettre à jour {credential}",
|
|
6132
|
+
"user.change_password.success": "Votre {credentialLower} a été mis à jour.",
|
|
6133
|
+
"user.change_password.mismatch.error": "Les {credentialLower}s ne correspondent pas.",
|
|
6134
|
+
"user.change_password.generic.error": "Une erreur est survenue lors de la mise à jour de votre {credentialLower}. Veuillez réessayer.",
|
|
6135
|
+
"user.change_password.unavailable.heading": "Modification du {credentialLower} indisponible",
|
|
6136
|
+
"user.change_password.unavailable.description": "Veuillez contacter votre administrateur.",
|
|
6137
|
+
"validation.password.pattern": "Correspond au format requis",
|
|
5089
6138
|
"organization.switcher.switch.organization": "Changer d'organisation",
|
|
5090
6139
|
"organization.switcher.loading.placeholder.organizations": "Chargement des organisations...",
|
|
5091
6140
|
"organization.switcher.members": "membres",
|
|
@@ -5127,6 +6176,7 @@ const fr_FR = {
|
|
|
5127
6176
|
"errors.signup.initialization": "Une erreur est survenue lors de l'initialisation. Veuillez réessayer plus tard.",
|
|
5128
6177
|
"errors.signup.flow.failure": "Une erreur est survenue lors du flux d'inscription. Veuillez réessayer plus tard.",
|
|
5129
6178
|
"errors.signup.flow.initialization.failure": "Une erreur est survenue lors de l'initialisation du flux d'inscription. Veuillez réessayer plus tard.",
|
|
6179
|
+
"errors.signup.popup.failure": "Impossible de poursuivre l'inscription dans la fenêtre contextuelle. Veuillez réessayer.",
|
|
5130
6180
|
"errors.signup.components.not.available": "Le formulaire d'inscription n'est pas disponible pour le moment. Veuillez réessayer plus tard.",
|
|
5131
6181
|
"errors.signin.components.not.available": "Le formulaire de connexion n'est pas disponible pour le moment. Veuillez réessayer plus tard.",
|
|
5132
6182
|
"errors.signin.timeout": "Le temps imparti pour effectuer cette e'tape est expire'."
|
|
@@ -5207,6 +6257,19 @@ const te_IN = {
|
|
|
5207
6257
|
"passkey.register.description": "పాస్వర్డ్ లేకుండా మీ ఖాతాలోకి సురక్షితంగా సైన్ ఇన్ చేయడానికి Passkey ని సృష్టించండి.",
|
|
5208
6258
|
"user.profile.heading": "ప్రొఫైల్",
|
|
5209
6259
|
"user.profile.update.generic.error": "ప్రొఫైల్ అప్డేట్ చేస్తూ లోపం వచ్చింది. దయచేసి మళ్లీ ప్రయత్నించండి.",
|
|
6260
|
+
"user.change_password.heading": "{credential} మార్చండి",
|
|
6261
|
+
"user.change_password.new.label": "కొత్త {credential}",
|
|
6262
|
+
"user.change_password.new.placeholder": "మీ కొత్త {credentialLower} నమోదు చేయండి",
|
|
6263
|
+
"user.change_password.confirm.label": "కొత్త {credential} నిర్ధారించండి",
|
|
6264
|
+
"user.change_password.confirm.placeholder": "మీ కొత్త {credentialLower}ని మళ్లీ నమోదు చేయండి",
|
|
6265
|
+
"user.change_password.requirements.heading": "మీ {credentialLower} కింది వాటిని కలిగి ఉండాలి:",
|
|
6266
|
+
"user.change_password.submit": "{credential} నవీకరించండి",
|
|
6267
|
+
"user.change_password.success": "మీ {credentialLower} నవీకరించబడింది.",
|
|
6268
|
+
"user.change_password.mismatch.error": "{credentialLower} సరిపోలలేదు.",
|
|
6269
|
+
"user.change_password.generic.error": "మీ {credentialLower} నవీకరించేటప్పుడు లోపం వచ్చింది. దయచేసి మళ్లీ ప్రయత్నించండి.",
|
|
6270
|
+
"user.change_password.unavailable.heading": "{credential} మార్పులు అందుబాటులో లేవు",
|
|
6271
|
+
"user.change_password.unavailable.description": "దయచేసి మీ నిర్వాహకుడిని సంప్రదించండి.",
|
|
6272
|
+
"validation.password.pattern": "అవసరమైన ఫార్మాట్కు సరిపోతుంది",
|
|
5210
6273
|
"organization.switcher.switch.organization": "ఆర్గనైజేషన్ మార్చండి",
|
|
5211
6274
|
"organization.switcher.loading.placeholder.organizations": "ఆర్గనైజేషన్లు లోడ్ అవుతున్నాయి...",
|
|
5212
6275
|
"organization.switcher.members": "సభ్యులు",
|
|
@@ -5248,6 +6311,7 @@ const te_IN = {
|
|
|
5248
6311
|
"errors.signup.initialization": "ప్రారంభించేటప్పుడు లోపం వచ్చింది. దయచేసి తరువాత మళ్లీ ప్రయత్నించండి.",
|
|
5249
6312
|
"errors.signup.flow.failure": "సైన్ అప్ ప్రక్రియలో లోపం వచ్చింది. దయచేసి తరువాత మళ్లీ ప్రయత్నించండి.",
|
|
5250
6313
|
"errors.signup.flow.initialization.failure": "సైన్ అప్ ప్రక్రియను ప్రారంభించేటప్పుడు లోపం వచ్చింది. దయచేసి తరువాత మళ్లీ ప్రయత్నించండి.",
|
|
6314
|
+
"errors.signup.popup.failure": "పాప్-అప్ విండోలో సైన్ అప్ కొనసాగించడం సాధ్యం కాలేదు. దయచేసి మళ్లీ ప్రయత్నించండి.",
|
|
5251
6315
|
"errors.signup.components.not.available": "సైన్ అప్ ఫారం ప్రస్తుతం అందుబాటులో లేదు. దయచేసి తరువాత మళ్లీ ప్రయత్నించండి.",
|
|
5252
6316
|
"errors.signin.components.not.available": "సైన్ ఇన్ ఫారం ప్రస్తుతం అందుబాటులో లేదు. దయచేసి తరువాత మళ్లీ ప్రయత్నించండి.",
|
|
5253
6317
|
"errors.signin.timeout": "దశను పూర్తి చేయడానికి అనుమతించబడిన సమయం ముగిసింది."
|
|
@@ -5328,6 +6392,19 @@ const hi_IN = {
|
|
|
5328
6392
|
"passkey.register.description": "बिना पासवर्ड के अपने खाते में सुरक्षित रूप से साइन इन करने के लिए एक Passkey बनाएं।",
|
|
5329
6393
|
"user.profile.heading": "प्रोफ़ाइल",
|
|
5330
6394
|
"user.profile.update.generic.error": "प्रोफ़ाइल अपडेट करते समय त्रुटि हुई। कृपया पुनः प्रयास करें।",
|
|
6395
|
+
"user.change_password.heading": "{credential} बदलें",
|
|
6396
|
+
"user.change_password.new.label": "नया {credential}",
|
|
6397
|
+
"user.change_password.new.placeholder": "अपना नया {credentialLower} दर्ज करें",
|
|
6398
|
+
"user.change_password.confirm.label": "नए {credential} की पुष्टि करें",
|
|
6399
|
+
"user.change_password.confirm.placeholder": "अपना नया {credentialLower} फिर से दर्ज करें",
|
|
6400
|
+
"user.change_password.requirements.heading": "आपके {credentialLower} में यह होना चाहिए:",
|
|
6401
|
+
"user.change_password.submit": "{credential} अपडेट करें",
|
|
6402
|
+
"user.change_password.success": "आपका {credentialLower} अपडेट कर दिया गया है।",
|
|
6403
|
+
"user.change_password.mismatch.error": "{credential} मेल नहीं खाते।",
|
|
6404
|
+
"user.change_password.generic.error": "आपका {credentialLower} अपडेट करते समय त्रुटि हुई। कृपया पुनः प्रयास करें।",
|
|
6405
|
+
"user.change_password.unavailable.heading": "{credential} परिवर्तन उपलब्ध नहीं है",
|
|
6406
|
+
"user.change_password.unavailable.description": "कृपया अपने व्यवस्थापक से संपर्क करें।",
|
|
6407
|
+
"validation.password.pattern": "आवश्यक प्रारूप से मेल खाता है",
|
|
5331
6408
|
"organization.switcher.switch.organization": "संगठन बदलें",
|
|
5332
6409
|
"organization.switcher.loading.placeholder.organizations": "संगठन लोड हो रहे हैं...",
|
|
5333
6410
|
"organization.switcher.members": "सदस्य",
|
|
@@ -5369,6 +6446,7 @@ const hi_IN = {
|
|
|
5369
6446
|
"errors.signup.initialization": "प्रारंभीकरण के दौरान एक त्रुटि हुई। कृपया बाद में पुनः प्रयास करें।",
|
|
5370
6447
|
"errors.signup.flow.failure": "साइन-अप प्रक्रिया में त्रुटि। कृपया बाद में पुनः प्रयास करें।",
|
|
5371
6448
|
"errors.signup.flow.initialization.failure": "साइन-अप प्रक्रिया प्रारंभ करते समय त्रुटि। कृपया बाद में पुनः प्रयास करें।",
|
|
6449
|
+
"errors.signup.popup.failure": "पॉप-अप विंडो में साइन-अप जारी नहीं रखा जा सका। कृपया पुनः प्रयास करें।",
|
|
5372
6450
|
"errors.signup.components.not.available": "साइन-अप फॉर्म फिलहाल उपलब्ध नहीं है। कृपया बाद में पुनः प्रयास करें।",
|
|
5373
6451
|
"errors.signin.components.not.available": "साइन-इन फॉर्म फिलहाल उपलब्ध नहीं है। कृपया बाद में पुनः प्रयास करें।",
|
|
5374
6452
|
"errors.signin.timeout": "स्टेप पूरा करने के लिए दिया गया समय खत्म हो गया है।"
|
|
@@ -5449,6 +6527,19 @@ const pt_BR = {
|
|
|
5449
6527
|
"passkey.register.description": "Crie uma passkey para entrar em sua conta com segurança sem uma senha.",
|
|
5450
6528
|
"user.profile.heading": "Perfil",
|
|
5451
6529
|
"user.profile.update.generic.error": "Ocorreu um erro ao atualizar seu perfil. Tente novamente.",
|
|
6530
|
+
"user.change_password.heading": "Alterar {credential}",
|
|
6531
|
+
"user.change_password.new.label": "Novo {credential}",
|
|
6532
|
+
"user.change_password.new.placeholder": "Digite seu novo {credentialLower}",
|
|
6533
|
+
"user.change_password.confirm.label": "Confirmar novo {credential}",
|
|
6534
|
+
"user.change_password.confirm.placeholder": "Digite novamente seu novo {credentialLower}",
|
|
6535
|
+
"user.change_password.requirements.heading": "Seu {credentialLower} deve conter:",
|
|
6536
|
+
"user.change_password.submit": "Atualizar {credential}",
|
|
6537
|
+
"user.change_password.success": "Seu {credentialLower} foi atualizado.",
|
|
6538
|
+
"user.change_password.mismatch.error": "Os {credentialLower}s não coincidem.",
|
|
6539
|
+
"user.change_password.generic.error": "Ocorreu um erro ao atualizar seu {credentialLower}. Tente novamente.",
|
|
6540
|
+
"user.change_password.unavailable.heading": "Alteração de {credentialLower} indisponível",
|
|
6541
|
+
"user.change_password.unavailable.description": "Entre em contato com o administrador.",
|
|
6542
|
+
"validation.password.pattern": "Corresponde ao formato exigido",
|
|
5452
6543
|
"organization.switcher.switch.organization": "Trocar Organização",
|
|
5453
6544
|
"organization.switcher.loading.placeholder.organizations": "Carregando organizações...",
|
|
5454
6545
|
"organization.switcher.members": "membros",
|
|
@@ -5490,6 +6581,7 @@ const pt_BR = {
|
|
|
5490
6581
|
"errors.signup.initialization": "Ocorreu um erro durante a inicialização. Tente novamente mais tarde.",
|
|
5491
6582
|
"errors.signup.flow.failure": "Ocorreu um erro durante o fluxo de cadastro. Tente novamente mais tarde.",
|
|
5492
6583
|
"errors.signup.flow.initialization.failure": "Ocorreu um erro ao inicializar o fluxo de cadastro. Tente novamente mais tarde.",
|
|
6584
|
+
"errors.signup.popup.failure": "Não foi possível continuar o cadastro na janela pop-up. Tente novamente.",
|
|
5493
6585
|
"errors.signup.components.not.available": "O formulário de cadastro não está disponível no momento. Tente novamente mais tarde.",
|
|
5494
6586
|
"errors.signin.components.not.available": "O formulário de login não está disponível no momento. Tente novamente mais tarde.",
|
|
5495
6587
|
"errors.signin.timeout": "O tempo permitido para concluir a etapa expirou."
|
|
@@ -5570,6 +6662,19 @@ const pt_PT = {
|
|
|
5570
6662
|
"passkey.register.description": "Crie uma passkey para iniciar sessão na sua conta com segurança sem palavra-passe.",
|
|
5571
6663
|
"user.profile.heading": "Perfil",
|
|
5572
6664
|
"user.profile.update.generic.error": "Ocorreu um erro ao actualizar o seu perfil. Tente novamente.",
|
|
6665
|
+
"user.change_password.heading": "Alterar {credential}",
|
|
6666
|
+
"user.change_password.new.label": "Novo {credential}",
|
|
6667
|
+
"user.change_password.new.placeholder": "Introduza o seu novo {credentialLower}",
|
|
6668
|
+
"user.change_password.confirm.label": "Confirmar novo {credential}",
|
|
6669
|
+
"user.change_password.confirm.placeholder": "Introduza novamente o seu novo {credentialLower}",
|
|
6670
|
+
"user.change_password.requirements.heading": "O seu {credentialLower} deve conter:",
|
|
6671
|
+
"user.change_password.submit": "Atualizar {credential}",
|
|
6672
|
+
"user.change_password.success": "O seu {credentialLower} foi atualizado.",
|
|
6673
|
+
"user.change_password.mismatch.error": "Os {credentialLower}s não coincidem.",
|
|
6674
|
+
"user.change_password.generic.error": "Ocorreu um erro ao actualizar o seu {credentialLower}. Tente novamente.",
|
|
6675
|
+
"user.change_password.unavailable.heading": "Alteração de {credentialLower} indisponível",
|
|
6676
|
+
"user.change_password.unavailable.description": "Contacte o seu administrador.",
|
|
6677
|
+
"validation.password.pattern": "Corresponde ao formato exigido",
|
|
5573
6678
|
"organization.switcher.switch.organization": "Trocar Organização",
|
|
5574
6679
|
"organization.switcher.loading.placeholder.organizations": "A carregar organizações...",
|
|
5575
6680
|
"organization.switcher.members": "membros",
|
|
@@ -5611,6 +6716,7 @@ const pt_PT = {
|
|
|
5611
6716
|
"errors.signup.initialization": "Ocorreu um erro durante a inicialização. Tente novamente mais tarde.",
|
|
5612
6717
|
"errors.signup.flow.failure": "Ocorreu um erro durante o fluxo de registo. Tente novamente mais tarde.",
|
|
5613
6718
|
"errors.signup.flow.initialization.failure": "Ocorreu um erro ao inicializar o fluxo de registo. Tente novamente mais tarde.",
|
|
6719
|
+
"errors.signup.popup.failure": "Não foi possível continuar o registo na janela pop-up. Tente novamente.",
|
|
5614
6720
|
"errors.signup.components.not.available": "O formulário de registo não está disponível de momento. Tente novamente mais tarde.",
|
|
5615
6721
|
"errors.signin.components.not.available": "O formulário de início de sessão não está disponível de momento. Tente novamente mais tarde.",
|
|
5616
6722
|
"errors.signin.timeout": "O tempo permitido para completar a etapa expirou."
|
|
@@ -5691,6 +6797,19 @@ const ta_IN = {
|
|
|
5691
6797
|
"passkey.register.description": "கடவுச்சொல் இல்லாமல் பாதுகாப்பாக உள்நுழைய ஒரு passkey-ஐ உருவாக்கவும்.",
|
|
5692
6798
|
"user.profile.heading": "சுயவிவரம்",
|
|
5693
6799
|
"user.profile.update.generic.error": "உங்கள் சுயவிவரத்தை புதுப்பிக்கும் போது பிழை ஏற்பட்டது. மீண்டும் முயற்சிக்கவும்.",
|
|
6800
|
+
"user.change_password.heading": "{credential} மாற்றவும்",
|
|
6801
|
+
"user.change_password.new.label": "புதிய {credential}",
|
|
6802
|
+
"user.change_password.new.placeholder": "உங்கள் புதிய {credentialLower}-ஐ உள்ளிடவும்",
|
|
6803
|
+
"user.change_password.confirm.label": "புதிய {credential}-ஐ உறுதிப்படுத்தவும்",
|
|
6804
|
+
"user.change_password.confirm.placeholder": "உங்கள் புதிய {credentialLower}-ஐ மீண்டும் உள்ளிடவும்",
|
|
6805
|
+
"user.change_password.requirements.heading": "உங்கள் {credentialLower} பின்வருவனவற்றைக் கொண்டிருக்க வேண்டும்:",
|
|
6806
|
+
"user.change_password.submit": "{credential}-ஐ புதுப்பிக்கவும்",
|
|
6807
|
+
"user.change_password.success": "உங்கள் {credentialLower} புதுப்பிக்கப்பட்டது.",
|
|
6808
|
+
"user.change_password.mismatch.error": "{credentialLower} பொருந்தவில்லை.",
|
|
6809
|
+
"user.change_password.generic.error": "உங்கள் {credentialLower}-ஐ புதுப்பிக்கும் போது பிழை ஏற்பட்டது. மீண்டும் முயற்சிக்கவும்.",
|
|
6810
|
+
"user.change_password.unavailable.heading": "{credential} மாற்றங்கள் கிடைக்கவில்லை",
|
|
6811
|
+
"user.change_password.unavailable.description": "உங்கள் நிர்வாகியை தொடர்பு கொள்ளவும்.",
|
|
6812
|
+
"validation.password.pattern": "தேவையான வடிவமைப்பிற்கு பொருந்துகிறது",
|
|
5694
6813
|
"organization.switcher.switch.organization": "அமைப்பை மாற்று",
|
|
5695
6814
|
"organization.switcher.loading.placeholder.organizations": "அமைப்புகள் ஏற்றப்படுகின்றன...",
|
|
5696
6815
|
"organization.switcher.members": "உறுப்பினர்கள்",
|
|
@@ -5732,6 +6851,7 @@ const ta_IN = {
|
|
|
5732
6851
|
"errors.signup.initialization": "தொடங்கும்போது பிழை ஏற்பட்டது. பின்னர் மீண்டும் முயற்சிக்கவும்.",
|
|
5733
6852
|
"errors.signup.flow.failure": "பதிவு செய்யும் செயல்பாட்டில் பிழை ஏற்பட்டது. பின்னர் மீண்டும் முயற்சிக்கவும்.",
|
|
5734
6853
|
"errors.signup.flow.initialization.failure": "பதிவு செய்யும் செயல்பாட்டை தொடங்கும்போது பிழை ஏற்பட்டது. பின்னர் மீண்டும் முயற்சிக்கவும்.",
|
|
6854
|
+
"errors.signup.popup.failure": "பாப்-அப் சாளரத்தில் பதிவைத் தொடர முடியவில்லை. மீண்டும் முயற்சிக்கவும்.",
|
|
5735
6855
|
"errors.signup.components.not.available": "பதிவு படிவம் இப்போது கிடைக்கவில்லை. பின்னர் மீண்டும் முயற்சிக்கவும்.",
|
|
5736
6856
|
"errors.signin.components.not.available": "உள்நுழைவு படிவம் இப்போது கிடைக்கவில்லை. பின்னர் மீண்டும் முயற்சிக்கவும்.",
|
|
5737
6857
|
"errors.signin.timeout": "படிநிலையை முடிக்க அனுமதிக்கப்பட்ட நேரம் காலாவதியானது."
|
|
@@ -5812,6 +6932,19 @@ const si_LK = {
|
|
|
5812
6932
|
"passkey.register.description": "මුරපදයක් නොමැතිව ඔබේ ගිණුමට ආරක්ෂිතව ඇතුල් වීමට passkey එකක් සාදන්න.",
|
|
5813
6933
|
"user.profile.heading": "පැතිකඩ",
|
|
5814
6934
|
"user.profile.update.generic.error": "ඔබේ පැතිකඩ යාවත්කාලීන කිරීමේදී දෝෂයක් ඇතිවිය.කරුණාකර නැවත උත්සාහ කරන්න",
|
|
6935
|
+
"user.change_password.heading": "{credential} වෙනස් කරන්න",
|
|
6936
|
+
"user.change_password.new.label": "නව {credential}",
|
|
6937
|
+
"user.change_password.new.placeholder": "ඔබේ නව {credentialLower} ඇතුළත් කරන්න",
|
|
6938
|
+
"user.change_password.confirm.label": "නව {credential} තහවුරු කරන්න",
|
|
6939
|
+
"user.change_password.confirm.placeholder": "ඔබේ නව {credentialLower} නැවත ඇතුළත් කරන්න",
|
|
6940
|
+
"user.change_password.requirements.heading": "ඔබේ {credentialLower} තුළ තිබිය යුතුය:",
|
|
6941
|
+
"user.change_password.submit": "{credential} යාවත්කාලීන කරන්න",
|
|
6942
|
+
"user.change_password.success": "ඔබේ {credentialLower} යාවත්කාලීන කර ඇත.",
|
|
6943
|
+
"user.change_password.mismatch.error": "{credentialLower} නොගැලපේ.",
|
|
6944
|
+
"user.change_password.generic.error": "ඔබේ {credentialLower} යාවත්කාලීන කිරීමේදී දෝෂයක් ඇතිවිය. කරුණාකර නැවත උත්සාහ කරන්න.",
|
|
6945
|
+
"user.change_password.unavailable.heading": "{credential} වෙනස් කිරීම් ලබා ගත නොහැක",
|
|
6946
|
+
"user.change_password.unavailable.description": "කරුණාකර ඔබේ පරිපාලක සම්බන්ධ කර ගන්න.",
|
|
6947
|
+
"validation.password.pattern": "අවශ්ය ආකෘතියට ගැලපේ",
|
|
5815
6948
|
"organization.switcher.switch.organization": "සංවිධානය මාරු කරන්න",
|
|
5816
6949
|
"organization.switcher.loading.placeholder.organizations": "සංවිධාන ලෝඩ් වෙමින්...",
|
|
5817
6950
|
"organization.switcher.members": "සාමාජිකයන්",
|
|
@@ -5853,6 +6986,7 @@ const si_LK = {
|
|
|
5853
6986
|
"errors.signup.initialization": "ආරම්භ කිරීමේදී දෝෂයක් සිදු විය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.",
|
|
5854
6987
|
"errors.signup.flow.failure": "ගිණුම් තැනීමේ ක්රියාවලියේදී දෝෂයක් සිදු විය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.",
|
|
5855
6988
|
"errors.signup.flow.initialization.failure": "ගිණුම් තැනීමේ ක්රියාවලිය ආරම්භ කිරීමේදී දෝෂයක් සිදු විය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.",
|
|
6989
|
+
"errors.signup.popup.failure": "උත්පතන කවුළුවේ ගිණුම් තැනීම දිගටම කරගෙන යා නොහැකි විය. කරුණාකර නැවත උත්සාහ කරන්න.",
|
|
5856
6990
|
"errors.signup.components.not.available": "ගිණුම් තැනීමේ පිටුව දැන් ලබා ගත නොහැකිය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.",
|
|
5857
6991
|
"errors.signin.components.not.available": "ප්රවේශ වීමේ පිටුව දැන් ලබා ගත නොහැකිය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.",
|
|
5858
6992
|
"errors.signin.timeout": "පියවර සම්පූර්ණ කිරීමට ලබා දී තිබූ කාලය ඉකුත් වී ඇත."
|
|
@@ -5949,9 +7083,13 @@ const normalizeTranslations = (translations) => {
|
|
|
5949
7083
|
var normalizeTranslations_default = normalizeTranslations;
|
|
5950
7084
|
|
|
5951
7085
|
//#endregion
|
|
7086
|
+
exports.AgentQueryKeys = AgentQueryKeys_default;
|
|
5952
7087
|
exports.ApplicationNativeAuthenticationConstants = ApplicationNativeAuthenticationConstants_default;
|
|
7088
|
+
exports.ApplicationQueryKeys = ApplicationQueryKeys_default;
|
|
5953
7089
|
exports.AuthenticationHelper = AuthenticationHelper_default;
|
|
7090
|
+
exports.BackchannelLogoutConstants = BackchannelLogoutConstants_default;
|
|
5954
7091
|
exports.ConsentConstants = ConsentConstants_default;
|
|
7092
|
+
exports.CredentialConstants = CredentialConstants_default;
|
|
5955
7093
|
exports.DEFAULT_THEME = DEFAULT_THEME;
|
|
5956
7094
|
exports.DEFAULT_VALIDATION_MESSAGE_KEYS = DEFAULT_VALIDATION_MESSAGE_KEYS;
|
|
5957
7095
|
exports.EMOJI_URI_SCHEME = EMOJI_URI_SCHEME;
|
|
@@ -5971,8 +7109,13 @@ exports.FieldType = FieldType;
|
|
|
5971
7109
|
exports.FlowMetaType = FlowMetaType;
|
|
5972
7110
|
exports.FlowMode = FlowMode;
|
|
5973
7111
|
exports.HttpClient = HttpClient;
|
|
7112
|
+
exports.InboundAuthTypes = InboundAuthTypes;
|
|
7113
|
+
exports.InvalidLogoutTokenError = InvalidLogoutTokenError;
|
|
5974
7114
|
exports.IsomorphicCrypto = IsomorphicCrypto;
|
|
7115
|
+
exports.OAuth2GrantTypes = OAuth2GrantTypes;
|
|
7116
|
+
exports.OAuth2ResponseTypes = OAuth2ResponseTypes;
|
|
5975
7117
|
exports.OIDCRequestConstants = OIDCRequestConstants_default;
|
|
7118
|
+
exports.REFRESH_TOKEN_ISSUING_GRANTS = REFRESH_TOKEN_ISSUING_GRANTS;
|
|
5976
7119
|
exports.StorageManager = StorageManager_default;
|
|
5977
7120
|
exports.ThunderIDAPIError = ThunderIDAPIError;
|
|
5978
7121
|
exports.ThunderIDAuthException = ThunderIDAuthException;
|
|
@@ -5980,7 +7123,9 @@ exports.ThunderIDError = ThunderIDError;
|
|
|
5980
7123
|
exports.ThunderIDJavaScriptClient = ThunderIDJavaScriptClient_default;
|
|
5981
7124
|
exports.ThunderIDRuntimeError = ThunderIDRuntimeError;
|
|
5982
7125
|
exports.TokenConstants = TokenConstants_default;
|
|
7126
|
+
exports.TokenEndpointAuthMethods = TokenEndpointAuthMethods;
|
|
5983
7127
|
exports.TranslationBundleConstants = TranslationBundleConstants_default;
|
|
7128
|
+
exports.UserQueryKeys = UserQueryKeys_default;
|
|
5984
7129
|
exports.VendorConstants = VendorConstants_default;
|
|
5985
7130
|
exports.arrayBufferToBase64url = arrayBufferToBase64url_default;
|
|
5986
7131
|
exports.base64urlToArrayBuffer = base64urlToArrayBuffer_default;
|
|
@@ -5988,14 +7133,22 @@ exports.bem = bem_default;
|
|
|
5988
7133
|
exports.buildValidatorFromRules = buildValidatorFromRules_default;
|
|
5989
7134
|
exports.configureLogger = configure;
|
|
5990
7135
|
exports.countryCodeToFlagEmoji = countryCodeToFlagEmoji;
|
|
7136
|
+
exports.createAgent = createAgent_default;
|
|
7137
|
+
exports.createApplication = createApplication_default;
|
|
5991
7138
|
exports.createComponentLogger = createComponentLogger;
|
|
5992
7139
|
exports.createLogger = createLogger;
|
|
5993
7140
|
exports.createPackageComponentLogger = createPackageComponentLogger;
|
|
5994
7141
|
exports.createPackageLogger = createPackageLogger;
|
|
5995
7142
|
exports.createTheme = createTheme_default;
|
|
7143
|
+
exports.createUser = createUser_default;
|
|
5996
7144
|
exports.debug = debug;
|
|
5997
7145
|
exports.deepMerge = deepMerge_default;
|
|
7146
|
+
exports.deleteAgent = deleteAgent_default;
|
|
7147
|
+
exports.deleteApplication = deleteApplication_default;
|
|
7148
|
+
exports.deleteUser = deleteUser_default;
|
|
5998
7149
|
exports.error = error;
|
|
7150
|
+
exports.evaluateChangePasswordForm = evaluateChangePasswordForm_default;
|
|
7151
|
+
exports.evaluatePasswordPolicy = evaluatePasswordPolicy_default;
|
|
5999
7152
|
exports.evaluateValidationRule = evaluateValidationRule_default;
|
|
6000
7153
|
exports.executeEmbeddedRecoveryFlow = executeEmbeddedRecoveryFlow_default;
|
|
6001
7154
|
exports.executeEmbeddedSignInFlow = executeEmbeddedSignInFlow_default;
|
|
@@ -6007,13 +7160,19 @@ exports.extractUserClaimsFromIdToken = extractUserClaimsFromIdToken_default;
|
|
|
6007
7160
|
exports.formatDate = formatDate_default;
|
|
6008
7161
|
exports.generateFlattenedUserProfile = generateFlattenedUserProfile_default;
|
|
6009
7162
|
exports.get = get_default;
|
|
7163
|
+
exports.getAgent = getAgent_default;
|
|
7164
|
+
exports.getAgents = getAgents_default;
|
|
7165
|
+
exports.getApplication = getApplication_default;
|
|
7166
|
+
exports.getApplications = getApplications_default;
|
|
6010
7167
|
exports.getBaseLanguage = getBaseLanguage;
|
|
6011
7168
|
exports.getDefaultI18nBundles = getDefaultI18nBundles_default;
|
|
6012
7169
|
exports.getFlowMeta = getFlowMeta_default;
|
|
6013
7170
|
exports.getLatestStateParam = getLatestStateParam_default;
|
|
6014
7171
|
exports.getOrganizationUnitChildren = getOrganizationUnitChildren_default;
|
|
6015
7172
|
exports.getRedirectBasedSignUpUrl = getRedirectBasedSignUpUrl_default;
|
|
7173
|
+
exports.getUser = getUser_default;
|
|
6016
7174
|
exports.getUserInfo = getUserInfo_default;
|
|
7175
|
+
exports.getUsers = getUsers_default;
|
|
6017
7176
|
exports.getUsersMe = getUsersMe_default;
|
|
6018
7177
|
exports.getUsersMeMeta = getUsersMeMeta_default;
|
|
6019
7178
|
exports.getVendorPrefix = getVendorPrefix_default;
|
|
@@ -6023,10 +7182,13 @@ exports.isEmojiUri = isEmojiUri_default;
|
|
|
6023
7182
|
exports.isEmpty = isEmpty_default;
|
|
6024
7183
|
exports.isRecognizedBaseUrlPattern = isRecognizedBaseUrlPattern_default;
|
|
6025
7184
|
exports.logger = logger_default;
|
|
7185
|
+
exports.mapCredentialUpdateError = mapCredentialUpdateError_default;
|
|
6026
7186
|
exports.normalizeLocaleTag = normalizeLocaleTag;
|
|
6027
7187
|
exports.normalizeTranslations = normalizeTranslations_default;
|
|
7188
|
+
exports.parseKeyValuePairs = parseKeyValuePairs_default;
|
|
6028
7189
|
exports.processOpenIDScopes = processOpenIDScopes_default;
|
|
6029
7190
|
exports.removeTrailingSlash = removeTrailingSlash_default;
|
|
7191
|
+
exports.resolveChangeCredentialPolicy = resolveChangeCredentialPolicy_default;
|
|
6030
7192
|
exports.resolveFieldName = resolveFieldName_default;
|
|
6031
7193
|
exports.resolveFlowTemplateLiterals = resolveFlowTemplateLiterals;
|
|
6032
7194
|
exports.resolveLocaleDisplayName = resolveLocaleDisplayName;
|
|
@@ -6036,6 +7198,12 @@ exports.resolveResourceEndpoint = resolveResourceEndpoint_default;
|
|
|
6036
7198
|
exports.set = set_default;
|
|
6037
7199
|
exports.startCase = startCase_default;
|
|
6038
7200
|
exports.substituteTranslationParams = substituteTranslationParams_default;
|
|
7201
|
+
exports.supportsCredential = supportsCredential_default;
|
|
7202
|
+
exports.updateAgent = updateAgent_default;
|
|
7203
|
+
exports.updateApplication = updateApplication_default;
|
|
7204
|
+
exports.updateMeCredentials = updateMeCredentials_default;
|
|
6039
7205
|
exports.updateMeProfile = updateMeProfile_default;
|
|
7206
|
+
exports.updateUser = updateUser_default;
|
|
7207
|
+
exports.validateLogoutTokenClaims = validateLogoutTokenClaims_default;
|
|
6040
7208
|
exports.warn = warn;
|
|
6041
7209
|
exports.withVendorCSSClassPrefix = withVendorCSSClassPrefix_default;
|