@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/index.js
CHANGED
|
@@ -61,6 +61,15 @@ var ThunderIDAuthException = class extends Error {
|
|
|
61
61
|
Object.setPrototypeOf(this, new.target.prototype);
|
|
62
62
|
}
|
|
63
63
|
};
|
|
64
|
+
/**
|
|
65
|
+
* Raised when a back-channel logout token is not valid. A logout handler answers 400 for this and a
|
|
66
|
+
* 5xx for any other failure, which tells the server whether a retry can help.
|
|
67
|
+
*/
|
|
68
|
+
var InvalidLogoutTokenError = class extends ThunderIDAuthException {
|
|
69
|
+
constructor(code, message) {
|
|
70
|
+
super(code, "Invalid logout token.", message);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
64
73
|
|
|
65
74
|
//#endregion
|
|
66
75
|
//#region src/IsomorphicCrypto.ts
|
|
@@ -124,6 +133,38 @@ var IsomorphicCrypto = class {
|
|
|
124
133
|
return Promise.reject(new ThunderIDAuthException("JS-CRYPTO_HELPER-IVIT-IV01", "Invalid ID token.", "ID token validation returned false"));
|
|
125
134
|
}).catch((error$1) => Promise.reject(error$1));
|
|
126
135
|
}
|
|
136
|
+
/**
|
|
137
|
+
* Verifies the signature of a back-channel logout token, along with its audience, issuer,
|
|
138
|
+
* lifetime and, when the token has one, subject.
|
|
139
|
+
*
|
|
140
|
+
* @param logoutToken - The logout token received from the server.
|
|
141
|
+
* @param jwk - The server key the token names.
|
|
142
|
+
* @param clientId - The client the token must be addressed to.
|
|
143
|
+
* @param issuer - The expected issuer.
|
|
144
|
+
* @param subject - The token's subject, when it has one.
|
|
145
|
+
* @param clockTolerance - Allowed clock difference in seconds.
|
|
146
|
+
*
|
|
147
|
+
* @throws {InvalidLogoutTokenError} When verification fails. The message never includes the token.
|
|
148
|
+
*/
|
|
149
|
+
async verifyLogoutTokenSignature(logoutToken, jwk, clientId, issuer, subject, clockTolerance) {
|
|
150
|
+
let verified = false;
|
|
151
|
+
try {
|
|
152
|
+
verified = await this.cryptoUtils.verifyJwt(logoutToken, jwk, TokenConstants_default.SignatureValidation.SUPPORTED_ALGORITHMS, clientId, issuer, subject, clockTolerance, true);
|
|
153
|
+
} catch {
|
|
154
|
+
verified = false;
|
|
155
|
+
}
|
|
156
|
+
if (!verified) throw new InvalidLogoutTokenError("JS-CRYPTO_HELPER-VLTS-IV01", "The logout token signature could not be verified.");
|
|
157
|
+
}
|
|
158
|
+
/**
|
|
159
|
+
* Decodes the JOSE header of a JWT without verifying its signature.
|
|
160
|
+
*/
|
|
161
|
+
decodeJwtHeader(token) {
|
|
162
|
+
try {
|
|
163
|
+
return JSON.parse(this.cryptoUtils.base64URLDecode(token?.split(".")[0]));
|
|
164
|
+
} catch {
|
|
165
|
+
throw new ThunderIDAuthException("JS-CRYPTO_UTIL-DJH-IV01", "Decoding token failed.", "The token header could not be decoded.");
|
|
166
|
+
}
|
|
167
|
+
}
|
|
127
168
|
decodeJwtToken(token) {
|
|
128
169
|
try {
|
|
129
170
|
const utf8String = this.cryptoUtils.base64URLDecode(token?.split(".")[1]);
|
|
@@ -1012,6 +1053,8 @@ let EmbeddedFlowComponentType = /* @__PURE__ */ function(EmbeddedFlowComponentTy
|
|
|
1012
1053
|
EmbeddedFlowComponentType$1["Icon"] = "ICON";
|
|
1013
1054
|
/** Image display component for logos and illustrations */
|
|
1014
1055
|
EmbeddedFlowComponentType$1["Image"] = "IMAGE";
|
|
1056
|
+
/** Key-value list display component that shows label and value pairs published in additionalData */
|
|
1057
|
+
EmbeddedFlowComponentType$1["KeyValueList"] = "KEY_VALUE_LIST";
|
|
1015
1058
|
/** One-time password input field for multi-factor authentication */
|
|
1016
1059
|
EmbeddedFlowComponentType$1["OtpInput"] = "OTP_INPUT";
|
|
1017
1060
|
/** Organization unit tree picker for selecting an OU */
|
|
@@ -1445,6 +1488,73 @@ const getUsersMeMeta = async ({ baseUrl, fetcher, url,...requestConfig }) => {
|
|
|
1445
1488
|
};
|
|
1446
1489
|
var getUsersMeMeta_default = getUsersMeMeta;
|
|
1447
1490
|
|
|
1491
|
+
//#endregion
|
|
1492
|
+
//#region src/api/updateMeCredentials.ts
|
|
1493
|
+
/**
|
|
1494
|
+
* Updates one or more of the signed-in user's credentials at the
|
|
1495
|
+
* /users/me/update-credentials endpoint.
|
|
1496
|
+
*
|
|
1497
|
+
* The endpoint responds with `204 No Content` on success, so this function resolves with
|
|
1498
|
+
* `void` rather than a parsed body.
|
|
1499
|
+
*
|
|
1500
|
+
* @param config - Configuration object with URL, payload and optional request config.
|
|
1501
|
+
* @returns A promise that resolves once the credentials have been updated.
|
|
1502
|
+
* @example
|
|
1503
|
+
* ```typescript
|
|
1504
|
+
* // Using default fetch
|
|
1505
|
+
* await updateMeCredentials({
|
|
1506
|
+
* url: "https://localhost:8090/users/me/update-credentials",
|
|
1507
|
+
* payload: {password: "n3wP@ssword!"}
|
|
1508
|
+
* });
|
|
1509
|
+
* ```
|
|
1510
|
+
*
|
|
1511
|
+
* @example
|
|
1512
|
+
* ```typescript
|
|
1513
|
+
* // Using custom fetcher (e.g. an httpClient that attaches the access token)
|
|
1514
|
+
* await updateMeCredentials({
|
|
1515
|
+
* baseUrl: "https://localhost:8090",
|
|
1516
|
+
* payload: {password: "n3wP@ssword!"},
|
|
1517
|
+
* fetcher: async (url, config) => {
|
|
1518
|
+
* const response = await httpClient({url, method: config.method, headers: config.headers, data: config.body});
|
|
1519
|
+
* return {
|
|
1520
|
+
* ok: response.status >= 200 && response.status < 300,
|
|
1521
|
+
* status: response.status,
|
|
1522
|
+
* statusText: response.statusText,
|
|
1523
|
+
* json: () => Promise.resolve(response.data),
|
|
1524
|
+
* text: () => Promise.resolve(typeof response.data === 'string' ? response.data : JSON.stringify(response.data))
|
|
1525
|
+
* } as Response;
|
|
1526
|
+
* }
|
|
1527
|
+
* });
|
|
1528
|
+
* ```
|
|
1529
|
+
*/
|
|
1530
|
+
const updateMeCredentials = async ({ url, baseUrl, payload, fetcher,...requestConfig }) => {
|
|
1531
|
+
try {
|
|
1532
|
+
new URL(url ?? baseUrl);
|
|
1533
|
+
} catch (error$1) {
|
|
1534
|
+
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.");
|
|
1535
|
+
}
|
|
1536
|
+
const fetchFn = fetcher ?? fetch;
|
|
1537
|
+
const resolvedUrl = url ?? `${baseUrl?.replace(/\/$/, "")}/users/me/update-credentials`;
|
|
1538
|
+
const requestInit = {
|
|
1539
|
+
...requestConfig,
|
|
1540
|
+
method: "POST",
|
|
1541
|
+
body: JSON.stringify({ attributes: payload }),
|
|
1542
|
+
headers: {
|
|
1543
|
+
...requestConfig.headers,
|
|
1544
|
+
Accept: "application/json",
|
|
1545
|
+
"Content-Type": "application/json"
|
|
1546
|
+
}
|
|
1547
|
+
};
|
|
1548
|
+
try {
|
|
1549
|
+
const response = await fetchFn(resolvedUrl, requestInit);
|
|
1550
|
+
if (!response?.ok) throw new ThunderIDAPIError(await response.text(), "updateMeCredentials-ResponseError-001", "javascript", response.status, response.statusText, "Failed to update user credentials");
|
|
1551
|
+
} catch (error$1) {
|
|
1552
|
+
if (error$1 instanceof ThunderIDAPIError) throw error$1;
|
|
1553
|
+
throw new ThunderIDAPIError(`Network or parsing error: ${error$1 instanceof Error ? error$1.message : "Unknown error"}`, "updateMeCredentials-NetworkError-001", "javascript", 0, "Network Error");
|
|
1554
|
+
}
|
|
1555
|
+
};
|
|
1556
|
+
var updateMeCredentials_default = updateMeCredentials;
|
|
1557
|
+
|
|
1448
1558
|
//#endregion
|
|
1449
1559
|
//#region src/api/updateMeProfile.ts
|
|
1450
1560
|
/**
|
|
@@ -1522,6 +1632,456 @@ const updateMeProfile = async ({ url, baseUrl, payload, fetcher,...requestConfig
|
|
|
1522
1632
|
};
|
|
1523
1633
|
var updateMeProfile_default = updateMeProfile;
|
|
1524
1634
|
|
|
1635
|
+
//#endregion
|
|
1636
|
+
//#region src/utils/requestManagementResource.ts
|
|
1637
|
+
/**
|
|
1638
|
+
* Performs a request against a management API resource and maps failures onto
|
|
1639
|
+
* {@link ThunderIDAPIError}. HTTP 403 and 404 get their own codes so a caller can tell a missing
|
|
1640
|
+
* permission from a missing resource.
|
|
1641
|
+
*
|
|
1642
|
+
* @returns The parsed JSON body, or `undefined` when the server returns no content.
|
|
1643
|
+
*/
|
|
1644
|
+
const requestManagementResource = async ({ baseUrl, url, fetcher,...requestConfig }, { body, collection, failureMessage, id, method, operation, query }) => {
|
|
1645
|
+
try {
|
|
1646
|
+
new URL(url ?? baseUrl);
|
|
1647
|
+
} catch (error$1) {
|
|
1648
|
+
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.");
|
|
1649
|
+
}
|
|
1650
|
+
if (id?.trim() === "") throw new ThunderIDAPIError("A resource identifier is required.", `${operation}-ValidationError-002`, "javascript", 400, "The provided resource identifier is empty.");
|
|
1651
|
+
const collectionUrl = (url ?? `${baseUrl}/${collection}`).replace(/\/+$/, "");
|
|
1652
|
+
const resourceUrl = id === void 0 ? collectionUrl : `${collectionUrl}/${encodeURIComponent(id)}`;
|
|
1653
|
+
const searchParams = new URLSearchParams();
|
|
1654
|
+
Object.entries(query ?? {}).forEach(([key, value]) => {
|
|
1655
|
+
if (value !== void 0) searchParams.set(key, String(value));
|
|
1656
|
+
});
|
|
1657
|
+
const queryString = searchParams.toString();
|
|
1658
|
+
const resolvedUrl = queryString ? `${resourceUrl}?${queryString}` : resourceUrl;
|
|
1659
|
+
const requestInit = {
|
|
1660
|
+
...requestConfig,
|
|
1661
|
+
headers: {
|
|
1662
|
+
Accept: "application/json",
|
|
1663
|
+
"Content-Type": "application/json",
|
|
1664
|
+
...requestConfig.headers
|
|
1665
|
+
},
|
|
1666
|
+
method,
|
|
1667
|
+
...body !== void 0 ? { body: JSON.stringify(body) } : {}
|
|
1668
|
+
};
|
|
1669
|
+
const fetchFn = fetcher ?? fetch;
|
|
1670
|
+
try {
|
|
1671
|
+
const response = await fetchFn(resolvedUrl, requestInit);
|
|
1672
|
+
if (!response?.ok) {
|
|
1673
|
+
const errorText = await response.text();
|
|
1674
|
+
let reason = "ResponseError";
|
|
1675
|
+
if (response.status === 403) reason = "ForbiddenError";
|
|
1676
|
+
else if (response.status === 404) reason = "NotFoundError";
|
|
1677
|
+
throw new ThunderIDAPIError(errorText, `${operation}-${reason}-001`, "javascript", response.status, response.statusText, failureMessage);
|
|
1678
|
+
}
|
|
1679
|
+
if (response.status === 204 || method === "DELETE") return;
|
|
1680
|
+
return await response.json();
|
|
1681
|
+
} catch (error$1) {
|
|
1682
|
+
if (error$1 instanceof ThunderIDAPIError) throw error$1;
|
|
1683
|
+
throw new ThunderIDAPIError(`Network or parsing error: ${error$1 instanceof Error ? error$1.message : "Unknown error"}`, `${operation}-NetworkError-001`, "javascript", 0, "Network Error");
|
|
1684
|
+
}
|
|
1685
|
+
};
|
|
1686
|
+
var requestManagementResource_default = requestManagementResource;
|
|
1687
|
+
|
|
1688
|
+
//#endregion
|
|
1689
|
+
//#region src/api/applications/getApplications.ts
|
|
1690
|
+
/**
|
|
1691
|
+
* Retrieves a page of applications.
|
|
1692
|
+
*
|
|
1693
|
+
* @param config - Request configuration object.
|
|
1694
|
+
* @returns A promise that resolves with the page of applications.
|
|
1695
|
+
*
|
|
1696
|
+
* @example
|
|
1697
|
+
* ```typescript
|
|
1698
|
+
* const {applications, totalResults} = await getApplications({
|
|
1699
|
+
* baseUrl: 'https://localhost:8090',
|
|
1700
|
+
* limit: 10,
|
|
1701
|
+
* offset: 0,
|
|
1702
|
+
* });
|
|
1703
|
+
* ```
|
|
1704
|
+
*/
|
|
1705
|
+
const getApplications = async ({ limit, offset,...config }) => requestManagementResource_default(config, {
|
|
1706
|
+
collection: "applications",
|
|
1707
|
+
failureMessage: "Failed to fetch applications",
|
|
1708
|
+
method: "GET",
|
|
1709
|
+
operation: "getApplications",
|
|
1710
|
+
query: {
|
|
1711
|
+
limit,
|
|
1712
|
+
offset
|
|
1713
|
+
}
|
|
1714
|
+
});
|
|
1715
|
+
var getApplications_default = getApplications;
|
|
1716
|
+
|
|
1717
|
+
//#endregion
|
|
1718
|
+
//#region src/api/applications/getApplication.ts
|
|
1719
|
+
/**
|
|
1720
|
+
* Retrieves a single application.
|
|
1721
|
+
*
|
|
1722
|
+
* @param config - Request configuration object.
|
|
1723
|
+
* @returns A promise that resolves with the application.
|
|
1724
|
+
*
|
|
1725
|
+
* @example
|
|
1726
|
+
* ```typescript
|
|
1727
|
+
* const application = await getApplication({
|
|
1728
|
+
* baseUrl: 'https://localhost:8090',
|
|
1729
|
+
* applicationId: '550e8400-e29b-41d4-a716-446655440000',
|
|
1730
|
+
* });
|
|
1731
|
+
* ```
|
|
1732
|
+
*/
|
|
1733
|
+
const getApplication = async ({ applicationId,...config }) => requestManagementResource_default(config, {
|
|
1734
|
+
collection: "applications",
|
|
1735
|
+
failureMessage: "Failed to fetch application",
|
|
1736
|
+
id: applicationId,
|
|
1737
|
+
method: "GET",
|
|
1738
|
+
operation: "getApplication"
|
|
1739
|
+
});
|
|
1740
|
+
var getApplication_default = getApplication;
|
|
1741
|
+
|
|
1742
|
+
//#endregion
|
|
1743
|
+
//#region src/api/applications/createApplication.ts
|
|
1744
|
+
/**
|
|
1745
|
+
* Creates an application.
|
|
1746
|
+
*
|
|
1747
|
+
* @param config - Request configuration object.
|
|
1748
|
+
* @returns A promise that resolves with the application as the server stored it.
|
|
1749
|
+
*
|
|
1750
|
+
* @example
|
|
1751
|
+
* ```typescript
|
|
1752
|
+
* const application = await createApplication({
|
|
1753
|
+
* baseUrl: 'https://localhost:8090',
|
|
1754
|
+
* payload: {name: 'My SPA', url: 'http://localhost:3000'},
|
|
1755
|
+
* });
|
|
1756
|
+
* ```
|
|
1757
|
+
*/
|
|
1758
|
+
const createApplication = async ({ payload,...config }) => requestManagementResource_default(config, {
|
|
1759
|
+
body: payload,
|
|
1760
|
+
collection: "applications",
|
|
1761
|
+
failureMessage: "Failed to create application",
|
|
1762
|
+
method: "POST",
|
|
1763
|
+
operation: "createApplication"
|
|
1764
|
+
});
|
|
1765
|
+
var createApplication_default = createApplication;
|
|
1766
|
+
|
|
1767
|
+
//#endregion
|
|
1768
|
+
//#region src/api/applications/updateApplication.ts
|
|
1769
|
+
/**
|
|
1770
|
+
* Updates an application.
|
|
1771
|
+
*
|
|
1772
|
+
* @param config - Request configuration object.
|
|
1773
|
+
* @returns A promise that resolves with the updated application.
|
|
1774
|
+
*
|
|
1775
|
+
* @example
|
|
1776
|
+
* ```typescript
|
|
1777
|
+
* const application = await updateApplication({
|
|
1778
|
+
* baseUrl: 'https://localhost:8090',
|
|
1779
|
+
* applicationId: '550e8400-e29b-41d4-a716-446655440000',
|
|
1780
|
+
* payload: {...existing, name: 'Renamed'},
|
|
1781
|
+
* });
|
|
1782
|
+
* ```
|
|
1783
|
+
*/
|
|
1784
|
+
const updateApplication = async ({ applicationId, payload,...config }) => requestManagementResource_default(config, {
|
|
1785
|
+
body: payload,
|
|
1786
|
+
collection: "applications",
|
|
1787
|
+
failureMessage: "Failed to update application",
|
|
1788
|
+
id: applicationId,
|
|
1789
|
+
method: "PUT",
|
|
1790
|
+
operation: "updateApplication"
|
|
1791
|
+
});
|
|
1792
|
+
var updateApplication_default = updateApplication;
|
|
1793
|
+
|
|
1794
|
+
//#endregion
|
|
1795
|
+
//#region src/api/applications/deleteApplication.ts
|
|
1796
|
+
/**
|
|
1797
|
+
* Deletes an application.
|
|
1798
|
+
*
|
|
1799
|
+
* @param config - Request configuration object.
|
|
1800
|
+
* @returns A promise that resolves once the application is deleted.
|
|
1801
|
+
*
|
|
1802
|
+
* @example
|
|
1803
|
+
* ```typescript
|
|
1804
|
+
* await deleteApplication({
|
|
1805
|
+
* baseUrl: 'https://localhost:8090',
|
|
1806
|
+
* applicationId: '550e8400-e29b-41d4-a716-446655440000',
|
|
1807
|
+
* });
|
|
1808
|
+
* ```
|
|
1809
|
+
*/
|
|
1810
|
+
const deleteApplication = async ({ applicationId,...config }) => requestManagementResource_default(config, {
|
|
1811
|
+
collection: "applications",
|
|
1812
|
+
failureMessage: "Failed to delete application",
|
|
1813
|
+
id: applicationId,
|
|
1814
|
+
method: "DELETE",
|
|
1815
|
+
operation: "deleteApplication"
|
|
1816
|
+
});
|
|
1817
|
+
var deleteApplication_default = deleteApplication;
|
|
1818
|
+
|
|
1819
|
+
//#endregion
|
|
1820
|
+
//#region src/api/users/getUsers.ts
|
|
1821
|
+
/**
|
|
1822
|
+
* Retrieves a page of users. Each user carries its resolved `display` value.
|
|
1823
|
+
*
|
|
1824
|
+
* @param config - Request configuration object.
|
|
1825
|
+
* @returns A promise that resolves with the page of users.
|
|
1826
|
+
*
|
|
1827
|
+
* @example
|
|
1828
|
+
* ```typescript
|
|
1829
|
+
* const {users, totalResults} = await getUsers({
|
|
1830
|
+
* baseUrl: 'https://localhost:8090',
|
|
1831
|
+
* limit: 10,
|
|
1832
|
+
* filter: 'username eq "alice"',
|
|
1833
|
+
* });
|
|
1834
|
+
* ```
|
|
1835
|
+
*/
|
|
1836
|
+
const getUsers = async ({ filter, limit, offset,...config }) => requestManagementResource_default(config, {
|
|
1837
|
+
collection: "users",
|
|
1838
|
+
failureMessage: "Failed to fetch users",
|
|
1839
|
+
method: "GET",
|
|
1840
|
+
operation: "getUsers",
|
|
1841
|
+
query: {
|
|
1842
|
+
filter,
|
|
1843
|
+
include: "display",
|
|
1844
|
+
limit,
|
|
1845
|
+
offset
|
|
1846
|
+
}
|
|
1847
|
+
});
|
|
1848
|
+
var getUsers_default = getUsers;
|
|
1849
|
+
|
|
1850
|
+
//#endregion
|
|
1851
|
+
//#region src/api/users/getUser.ts
|
|
1852
|
+
/**
|
|
1853
|
+
* Retrieves a single user, with its resolved `display` value.
|
|
1854
|
+
*
|
|
1855
|
+
* @param config - Request configuration object.
|
|
1856
|
+
* @returns A promise that resolves with the user.
|
|
1857
|
+
*
|
|
1858
|
+
* @example
|
|
1859
|
+
* ```typescript
|
|
1860
|
+
* const user = await getUser({
|
|
1861
|
+
* baseUrl: 'https://localhost:8090',
|
|
1862
|
+
* userId: '9a475e1e-b0cb-4b29-8df5-2e5b24fb0ed3',
|
|
1863
|
+
* });
|
|
1864
|
+
* ```
|
|
1865
|
+
*/
|
|
1866
|
+
const getUser = async ({ userId,...config }) => requestManagementResource_default(config, {
|
|
1867
|
+
collection: "users",
|
|
1868
|
+
failureMessage: "Failed to fetch user",
|
|
1869
|
+
id: userId,
|
|
1870
|
+
method: "GET",
|
|
1871
|
+
operation: "getUser",
|
|
1872
|
+
query: { include: "display" }
|
|
1873
|
+
});
|
|
1874
|
+
var getUser_default = getUser;
|
|
1875
|
+
|
|
1876
|
+
//#endregion
|
|
1877
|
+
//#region src/api/users/createUser.ts
|
|
1878
|
+
/**
|
|
1879
|
+
* Creates a user.
|
|
1880
|
+
*
|
|
1881
|
+
* @param config - Request configuration object.
|
|
1882
|
+
* @returns A promise that resolves with the user as the server stored it.
|
|
1883
|
+
*
|
|
1884
|
+
* @example
|
|
1885
|
+
* ```typescript
|
|
1886
|
+
* const user = await createUser({
|
|
1887
|
+
* baseUrl: 'https://localhost:8090',
|
|
1888
|
+
* payload: {ouId, type: 'customer', attributes: {username: 'alice'}},
|
|
1889
|
+
* });
|
|
1890
|
+
* ```
|
|
1891
|
+
*/
|
|
1892
|
+
const createUser = async ({ payload,...config }) => requestManagementResource_default(config, {
|
|
1893
|
+
body: payload,
|
|
1894
|
+
collection: "users",
|
|
1895
|
+
failureMessage: "Failed to create user",
|
|
1896
|
+
method: "POST",
|
|
1897
|
+
operation: "createUser"
|
|
1898
|
+
});
|
|
1899
|
+
var createUser_default = createUser;
|
|
1900
|
+
|
|
1901
|
+
//#endregion
|
|
1902
|
+
//#region src/api/users/updateUser.ts
|
|
1903
|
+
/**
|
|
1904
|
+
* Updates a user.
|
|
1905
|
+
*
|
|
1906
|
+
* @param config - Request configuration object.
|
|
1907
|
+
* @returns A promise that resolves with the updated user.
|
|
1908
|
+
*
|
|
1909
|
+
* @example
|
|
1910
|
+
* ```typescript
|
|
1911
|
+
* const user = await updateUser({
|
|
1912
|
+
* baseUrl: 'https://localhost:8090',
|
|
1913
|
+
* userId: '9a475e1e-b0cb-4b29-8df5-2e5b24fb0ed3',
|
|
1914
|
+
* payload: {attributes: {givenName: 'Alice'}},
|
|
1915
|
+
* });
|
|
1916
|
+
* ```
|
|
1917
|
+
*/
|
|
1918
|
+
const updateUser = async ({ userId, payload,...config }) => requestManagementResource_default(config, {
|
|
1919
|
+
body: payload,
|
|
1920
|
+
collection: "users",
|
|
1921
|
+
failureMessage: "Failed to update user",
|
|
1922
|
+
id: userId,
|
|
1923
|
+
method: "PUT",
|
|
1924
|
+
operation: "updateUser"
|
|
1925
|
+
});
|
|
1926
|
+
var updateUser_default = updateUser;
|
|
1927
|
+
|
|
1928
|
+
//#endregion
|
|
1929
|
+
//#region src/api/users/deleteUser.ts
|
|
1930
|
+
/**
|
|
1931
|
+
* Deletes a user.
|
|
1932
|
+
*
|
|
1933
|
+
* @param config - Request configuration object.
|
|
1934
|
+
* @returns A promise that resolves once the user is deleted.
|
|
1935
|
+
*
|
|
1936
|
+
* @example
|
|
1937
|
+
* ```typescript
|
|
1938
|
+
* await deleteUser({
|
|
1939
|
+
* baseUrl: 'https://localhost:8090',
|
|
1940
|
+
* userId: '9a475e1e-b0cb-4b29-8df5-2e5b24fb0ed3',
|
|
1941
|
+
* });
|
|
1942
|
+
* ```
|
|
1943
|
+
*/
|
|
1944
|
+
const deleteUser = async ({ userId,...config }) => requestManagementResource_default(config, {
|
|
1945
|
+
collection: "users",
|
|
1946
|
+
failureMessage: "Failed to delete user",
|
|
1947
|
+
id: userId,
|
|
1948
|
+
method: "DELETE",
|
|
1949
|
+
operation: "deleteUser"
|
|
1950
|
+
});
|
|
1951
|
+
var deleteUser_default = deleteUser;
|
|
1952
|
+
|
|
1953
|
+
//#endregion
|
|
1954
|
+
//#region src/api/agents/getAgents.ts
|
|
1955
|
+
/**
|
|
1956
|
+
* Retrieves a page of agents.
|
|
1957
|
+
*
|
|
1958
|
+
* @param config - Request configuration object.
|
|
1959
|
+
* @returns A promise that resolves with the page of agents.
|
|
1960
|
+
*
|
|
1961
|
+
* @example
|
|
1962
|
+
* ```typescript
|
|
1963
|
+
* const {agents, totalResults} = await getAgents({
|
|
1964
|
+
* baseUrl: 'https://localhost:8090',
|
|
1965
|
+
* limit: 10,
|
|
1966
|
+
* });
|
|
1967
|
+
* ```
|
|
1968
|
+
*/
|
|
1969
|
+
const getAgents = async ({ limit, offset,...config }) => requestManagementResource_default(config, {
|
|
1970
|
+
collection: "agents",
|
|
1971
|
+
failureMessage: "Failed to fetch agents",
|
|
1972
|
+
method: "GET",
|
|
1973
|
+
operation: "getAgents",
|
|
1974
|
+
query: {
|
|
1975
|
+
include: "display",
|
|
1976
|
+
limit,
|
|
1977
|
+
offset
|
|
1978
|
+
}
|
|
1979
|
+
});
|
|
1980
|
+
var getAgents_default = getAgents;
|
|
1981
|
+
|
|
1982
|
+
//#endregion
|
|
1983
|
+
//#region src/api/agents/getAgent.ts
|
|
1984
|
+
/**
|
|
1985
|
+
* Retrieves a single agent.
|
|
1986
|
+
*
|
|
1987
|
+
* @param config - Request configuration object.
|
|
1988
|
+
* @returns A promise that resolves with the agent.
|
|
1989
|
+
*
|
|
1990
|
+
* @example
|
|
1991
|
+
* ```typescript
|
|
1992
|
+
* const agent = await getAgent({
|
|
1993
|
+
* baseUrl: 'https://localhost:8090',
|
|
1994
|
+
* agentId: '6f1e2d3c-4b5a-4978-8a6b-5c4d3e2f1a0b',
|
|
1995
|
+
* });
|
|
1996
|
+
* ```
|
|
1997
|
+
*/
|
|
1998
|
+
const getAgent = async ({ agentId,...config }) => requestManagementResource_default(config, {
|
|
1999
|
+
collection: "agents",
|
|
2000
|
+
failureMessage: "Failed to fetch agent",
|
|
2001
|
+
id: agentId,
|
|
2002
|
+
method: "GET",
|
|
2003
|
+
operation: "getAgent",
|
|
2004
|
+
query: { include: "display" }
|
|
2005
|
+
});
|
|
2006
|
+
var getAgent_default = getAgent;
|
|
2007
|
+
|
|
2008
|
+
//#endregion
|
|
2009
|
+
//#region src/api/agents/createAgent.ts
|
|
2010
|
+
/**
|
|
2011
|
+
* Creates an agent.
|
|
2012
|
+
*
|
|
2013
|
+
* @param config - Request configuration object.
|
|
2014
|
+
* @returns A promise that resolves with the agent as the server stored it.
|
|
2015
|
+
*
|
|
2016
|
+
* @example
|
|
2017
|
+
* ```typescript
|
|
2018
|
+
* const agent = await createAgent({
|
|
2019
|
+
* baseUrl: 'https://localhost:8090',
|
|
2020
|
+
* payload: {ouId, type: 'default', name: 'Nightly Sync Worker'},
|
|
2021
|
+
* });
|
|
2022
|
+
* ```
|
|
2023
|
+
*/
|
|
2024
|
+
const createAgent = async ({ payload,...config }) => requestManagementResource_default(config, {
|
|
2025
|
+
body: payload,
|
|
2026
|
+
collection: "agents",
|
|
2027
|
+
failureMessage: "Failed to create agent",
|
|
2028
|
+
method: "POST",
|
|
2029
|
+
operation: "createAgent"
|
|
2030
|
+
});
|
|
2031
|
+
var createAgent_default = createAgent;
|
|
2032
|
+
|
|
2033
|
+
//#endregion
|
|
2034
|
+
//#region src/api/agents/updateAgent.ts
|
|
2035
|
+
/**
|
|
2036
|
+
* Updates an agent.
|
|
2037
|
+
*
|
|
2038
|
+
* @param config - Request configuration object.
|
|
2039
|
+
* @returns A promise that resolves with the updated agent.
|
|
2040
|
+
*
|
|
2041
|
+
* @example
|
|
2042
|
+
* ```typescript
|
|
2043
|
+
* const agent = await updateAgent({
|
|
2044
|
+
* baseUrl: 'https://localhost:8090',
|
|
2045
|
+
* agentId: '6f1e2d3c-4b5a-4978-8a6b-5c4d3e2f1a0b',
|
|
2046
|
+
* payload: {name: 'Renamed Agent'},
|
|
2047
|
+
* });
|
|
2048
|
+
* ```
|
|
2049
|
+
*/
|
|
2050
|
+
const updateAgent = async ({ agentId, payload,...config }) => requestManagementResource_default(config, {
|
|
2051
|
+
body: payload,
|
|
2052
|
+
collection: "agents",
|
|
2053
|
+
failureMessage: "Failed to update agent",
|
|
2054
|
+
id: agentId,
|
|
2055
|
+
method: "PUT",
|
|
2056
|
+
operation: "updateAgent"
|
|
2057
|
+
});
|
|
2058
|
+
var updateAgent_default = updateAgent;
|
|
2059
|
+
|
|
2060
|
+
//#endregion
|
|
2061
|
+
//#region src/api/agents/deleteAgent.ts
|
|
2062
|
+
/**
|
|
2063
|
+
* Deletes an agent.
|
|
2064
|
+
*
|
|
2065
|
+
* @param config - Request configuration object.
|
|
2066
|
+
* @returns A promise that resolves once the agent is deleted.
|
|
2067
|
+
*
|
|
2068
|
+
* @example
|
|
2069
|
+
* ```typescript
|
|
2070
|
+
* await deleteAgent({
|
|
2071
|
+
* baseUrl: 'https://localhost:8090',
|
|
2072
|
+
* agentId: '6f1e2d3c-4b5a-4978-8a6b-5c4d3e2f1a0b',
|
|
2073
|
+
* });
|
|
2074
|
+
* ```
|
|
2075
|
+
*/
|
|
2076
|
+
const deleteAgent = async ({ agentId,...config }) => requestManagementResource_default(config, {
|
|
2077
|
+
collection: "agents",
|
|
2078
|
+
failureMessage: "Failed to delete agent",
|
|
2079
|
+
id: agentId,
|
|
2080
|
+
method: "DELETE",
|
|
2081
|
+
operation: "deleteAgent"
|
|
2082
|
+
});
|
|
2083
|
+
var deleteAgent_default = deleteAgent;
|
|
2084
|
+
|
|
1525
2085
|
//#endregion
|
|
1526
2086
|
//#region src/constants/ApplicationNativeAuthenticationConstants.ts
|
|
1527
2087
|
/**
|
|
@@ -1545,6 +2105,21 @@ const ApplicationNativeAuthenticationConstants = { SupportedAuthenticators: {
|
|
|
1545
2105
|
} };
|
|
1546
2106
|
var ApplicationNativeAuthenticationConstants_default = ApplicationNativeAuthenticationConstants;
|
|
1547
2107
|
|
|
2108
|
+
//#endregion
|
|
2109
|
+
//#region src/constants/BackchannelLogoutConstants.ts
|
|
2110
|
+
/**
|
|
2111
|
+
* Constants for OpenID Connect Back-Channel Logout 1.0, for an SDK that receives logout tokens.
|
|
2112
|
+
*/
|
|
2113
|
+
const BackchannelLogoutConstants = {
|
|
2114
|
+
DEFAULT_CLOCK_TOLERANCE_SECONDS: 60,
|
|
2115
|
+
EVENT: "http://schemas.openid.net/event/backchannel-logout",
|
|
2116
|
+
JWKS_CACHE_TTL_MS: 6e5,
|
|
2117
|
+
JWKS_MIN_REFETCH_INTERVAL_MS: 3e4,
|
|
2118
|
+
TOKEN_PARAM: "logout_token",
|
|
2119
|
+
TOKEN_TYPE: "logout+jwt"
|
|
2120
|
+
};
|
|
2121
|
+
var BackchannelLogoutConstants_default = BackchannelLogoutConstants;
|
|
2122
|
+
|
|
1548
2123
|
//#endregion
|
|
1549
2124
|
//#region src/constants/ScopeConstants.ts
|
|
1550
2125
|
/**
|
|
@@ -1605,6 +2180,28 @@ var OIDCRequestConstants_default = OIDCRequestConstants;
|
|
|
1605
2180
|
const VendorConstants = { VENDOR_PREFIX: "thunderid" };
|
|
1606
2181
|
var VendorConstants_default = VendorConstants;
|
|
1607
2182
|
|
|
2183
|
+
//#endregion
|
|
2184
|
+
//#region src/constants/CredentialConstants.ts
|
|
2185
|
+
/**
|
|
2186
|
+
* Constants for the credential types the server accepts on the self-service
|
|
2187
|
+
* credential write path.
|
|
2188
|
+
*
|
|
2189
|
+
* The server keys credentials by type. `password` is the one every user type schema
|
|
2190
|
+
* declares by default, hence a named constant for it; any other schema-declared
|
|
2191
|
+
* `credential: true` attribute (for example `pin`) can be self-managed too, just by its
|
|
2192
|
+
* own attribute name rather than a constant here.
|
|
2193
|
+
*
|
|
2194
|
+
* @example
|
|
2195
|
+
* ```typescript
|
|
2196
|
+
* await updateMeCredentials({
|
|
2197
|
+
* payload: {[CredentialConstants.PASSWORD]: newPassword},
|
|
2198
|
+
* url,
|
|
2199
|
+
* });
|
|
2200
|
+
* ```
|
|
2201
|
+
*/
|
|
2202
|
+
const CredentialConstants = { PASSWORD: "password" };
|
|
2203
|
+
var CredentialConstants_default = CredentialConstants;
|
|
2204
|
+
|
|
1608
2205
|
//#endregion
|
|
1609
2206
|
//#region src/constants/ConsentConstants.ts
|
|
1610
2207
|
/**
|
|
@@ -1629,6 +2226,42 @@ const ConsentConstants = {
|
|
|
1629
2226
|
};
|
|
1630
2227
|
var ConsentConstants_default = ConsentConstants;
|
|
1631
2228
|
|
|
2229
|
+
//#endregion
|
|
2230
|
+
//#region src/constants/ApplicationQueryKeys.ts
|
|
2231
|
+
/**
|
|
2232
|
+
* Cache keys for application resources. The SDK's reactive wrappers use them to refetch after a
|
|
2233
|
+
* mutation, and an application can reuse them as keys in its own data fetching cache.
|
|
2234
|
+
*/
|
|
2235
|
+
const ApplicationQueryKeys = {
|
|
2236
|
+
APPLICATION: "application",
|
|
2237
|
+
APPLICATIONS: "applications"
|
|
2238
|
+
};
|
|
2239
|
+
var ApplicationQueryKeys_default = ApplicationQueryKeys;
|
|
2240
|
+
|
|
2241
|
+
//#endregion
|
|
2242
|
+
//#region src/constants/UserQueryKeys.ts
|
|
2243
|
+
/**
|
|
2244
|
+
* Cache keys for user resources. The SDK's reactive wrappers use them to refetch after a mutation,
|
|
2245
|
+
* and an application can reuse them as keys in its own data fetching cache.
|
|
2246
|
+
*/
|
|
2247
|
+
const UserQueryKeys = {
|
|
2248
|
+
USER: "user",
|
|
2249
|
+
USERS: "users"
|
|
2250
|
+
};
|
|
2251
|
+
var UserQueryKeys_default = UserQueryKeys;
|
|
2252
|
+
|
|
2253
|
+
//#endregion
|
|
2254
|
+
//#region src/constants/AgentQueryKeys.ts
|
|
2255
|
+
/**
|
|
2256
|
+
* Cache keys for agent resources. The SDK's reactive wrappers use them to refetch after a mutation,
|
|
2257
|
+
* and an application can reuse them as keys in its own data fetching cache.
|
|
2258
|
+
*/
|
|
2259
|
+
const AgentQueryKeys = {
|
|
2260
|
+
AGENT: "agent",
|
|
2261
|
+
AGENTS: "agents"
|
|
2262
|
+
};
|
|
2263
|
+
var AgentQueryKeys_default = AgentQueryKeys;
|
|
2264
|
+
|
|
1632
2265
|
//#endregion
|
|
1633
2266
|
//#region src/errors/ThunderIDRuntimeError.ts
|
|
1634
2267
|
/**
|
|
@@ -1755,6 +2388,51 @@ let FlowMode = /* @__PURE__ */ function(FlowMode$1) {
|
|
|
1755
2388
|
return FlowMode$1;
|
|
1756
2389
|
}({});
|
|
1757
2390
|
|
|
2391
|
+
//#endregion
|
|
2392
|
+
//#region src/models/application.ts
|
|
2393
|
+
/**
|
|
2394
|
+
* OAuth 2.0 grant type values.
|
|
2395
|
+
*/
|
|
2396
|
+
const OAuth2GrantTypes = {
|
|
2397
|
+
AUTHORIZATION_CODE: "authorization_code",
|
|
2398
|
+
CIBA: "urn:openid:params:grant-type:ciba",
|
|
2399
|
+
CLIENT_CREDENTIALS: "client_credentials",
|
|
2400
|
+
IMPLICIT: "implicit",
|
|
2401
|
+
JWT_BEARER: "urn:ietf:params:oauth:grant-type:jwt-bearer",
|
|
2402
|
+
PASSWORD: "password",
|
|
2403
|
+
REFRESH_TOKEN: "refresh_token",
|
|
2404
|
+
TOKEN_EXCHANGE: "urn:ietf:params:oauth:grant-type:token-exchange"
|
|
2405
|
+
};
|
|
2406
|
+
/**
|
|
2407
|
+
* Grant types that can issue a refresh token.
|
|
2408
|
+
*/
|
|
2409
|
+
const REFRESH_TOKEN_ISSUING_GRANTS = [OAuth2GrantTypes.AUTHORIZATION_CODE, OAuth2GrantTypes.CIBA];
|
|
2410
|
+
/**
|
|
2411
|
+
* OAuth 2.0 response type values.
|
|
2412
|
+
*/
|
|
2413
|
+
const OAuth2ResponseTypes = {
|
|
2414
|
+
CODE: "code",
|
|
2415
|
+
CODE_ID_TOKEN: "code id_token",
|
|
2416
|
+
CODE_TOKEN: "code token",
|
|
2417
|
+
ID_TOKEN: "id_token",
|
|
2418
|
+
TOKEN: "token",
|
|
2419
|
+
TOKEN_ID_TOKEN: "token id_token"
|
|
2420
|
+
};
|
|
2421
|
+
/**
|
|
2422
|
+
* Token endpoint authentication methods an application can be configured with.
|
|
2423
|
+
*/
|
|
2424
|
+
const TokenEndpointAuthMethods = {
|
|
2425
|
+
CLIENT_SECRET_BASIC: "client_secret_basic",
|
|
2426
|
+
CLIENT_SECRET_JWT: "client_secret_jwt",
|
|
2427
|
+
CLIENT_SECRET_POST: "client_secret_post",
|
|
2428
|
+
NONE: "none",
|
|
2429
|
+
PRIVATE_KEY_JWT: "private_key_jwt"
|
|
2430
|
+
};
|
|
2431
|
+
/**
|
|
2432
|
+
* Inbound authentication protocol values.
|
|
2433
|
+
*/
|
|
2434
|
+
const InboundAuthTypes = { OAUTH2: "oauth2" };
|
|
2435
|
+
|
|
1758
2436
|
//#endregion
|
|
1759
2437
|
//#region src/models/field.ts
|
|
1760
2438
|
let FieldType = /* @__PURE__ */ function(FieldType$1) {
|
|
@@ -2080,6 +2758,9 @@ var StorageManager = class StorageManager {
|
|
|
2080
2758
|
async getCustomData(key, userId) {
|
|
2081
2759
|
return JSON.parse(await this.store.getData(this.resolveKey(key, userId)) ?? null);
|
|
2082
2760
|
}
|
|
2761
|
+
async removeCustomData(key, userId) {
|
|
2762
|
+
await this.store.removeData(this.resolveKey(key, userId));
|
|
2763
|
+
}
|
|
2083
2764
|
setSessionStatus(status) {
|
|
2084
2765
|
if (StorageManager.isLocalStorageAvailable()) localStorage.setItem(`${this.vendor}-session-active`, status);
|
|
2085
2766
|
}
|
|
@@ -2280,9 +2961,13 @@ var processOpenIDScopes_default = processOpenIDScopes;
|
|
|
2280
2961
|
* endpoints. Used to keep these overrides out of the resolved OIDC provider metadata.
|
|
2281
2962
|
*/
|
|
2282
2963
|
const RESOURCE_ENDPOINT_KEYS = [
|
|
2964
|
+
"agents",
|
|
2965
|
+
"applications",
|
|
2283
2966
|
"flowExecute",
|
|
2284
2967
|
"flowMeta",
|
|
2968
|
+
"users",
|
|
2285
2969
|
"usersMe",
|
|
2970
|
+
"usersMeCredentials",
|
|
2286
2971
|
"usersMeMeta"
|
|
2287
2972
|
];
|
|
2288
2973
|
/**
|
|
@@ -2310,6 +2995,47 @@ const RESOURCE_ENDPOINT_KEYS = [
|
|
|
2310
2995
|
const resolveResourceEndpoint = (key, config, explicitUrl) => explicitUrl ?? config?.endpoints?.[key] ?? void 0;
|
|
2311
2996
|
var resolveResourceEndpoint_default = resolveResourceEndpoint;
|
|
2312
2997
|
|
|
2998
|
+
//#endregion
|
|
2999
|
+
//#region src/utils/validateLogoutTokenClaims.ts
|
|
3000
|
+
const fail = (code, message) => {
|
|
3001
|
+
throw new InvalidLogoutTokenError(code, message);
|
|
3002
|
+
};
|
|
3003
|
+
const isRecord = (value) => typeof value === "object" && value !== null && !Array.isArray(value);
|
|
3004
|
+
const isNonEmptyString = (value) => typeof value === "string" && value.length > 0;
|
|
3005
|
+
/**
|
|
3006
|
+
* Checks the header and claims of a back-channel logout token, per OpenID Connect Back-Channel
|
|
3007
|
+
* Logout 1.0 section 2.6. It does not verify the signature: the caller does that with the server's
|
|
3008
|
+
* keys. Messages never include the token or its claim values.
|
|
3009
|
+
*
|
|
3010
|
+
* @param header - The decoded JOSE header.
|
|
3011
|
+
* @param payload - The decoded claims.
|
|
3012
|
+
* @param options - The issuer, client and clock the claims are checked against.
|
|
3013
|
+
* @returns The claims, typed.
|
|
3014
|
+
* @throws {InvalidLogoutTokenError} When any check fails.
|
|
3015
|
+
*/
|
|
3016
|
+
const validateLogoutTokenClaims = (header, payload, options) => {
|
|
3017
|
+
if (!isRecord(header) || !isRecord(payload)) return fail("JS-LOGOUT_TOKEN-VLTC-IV01", "The logout token is not a well-formed JWT.");
|
|
3018
|
+
const type = typeof header["typ"] === "string" ? header["typ"].toLowerCase() : "";
|
|
3019
|
+
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.");
|
|
3020
|
+
if (typeof header["alg"] !== "string" || !options.supportedAlgorithms.includes(header["alg"])) return fail("JS-LOGOUT_TOKEN-VLTC-IV03", "The signature algorithm is not supported.");
|
|
3021
|
+
if ("nonce" in payload) return fail("JS-LOGOUT_TOKEN-VLTC-IV04", "A logout token must not carry a nonce.");
|
|
3022
|
+
const { events } = payload;
|
|
3023
|
+
if (!isRecord(events) || !isRecord(events[BackchannelLogoutConstants_default.EVENT])) return fail("JS-LOGOUT_TOKEN-VLTC-IV05", "The back-channel logout event is missing.");
|
|
3024
|
+
if (payload["iss"] !== options.issuer) return fail("JS-LOGOUT_TOKEN-VLTC-IV06", "The issuer does not match.");
|
|
3025
|
+
const audiences = Array.isArray(payload["aud"]) ? payload["aud"] : [payload["aud"]];
|
|
3026
|
+
if (!isNonEmptyString(options.clientId) || !audiences.includes(options.clientId)) return fail("JS-LOGOUT_TOKEN-VLTC-IV07", "The audience does not include this client.");
|
|
3027
|
+
const now = options.now ?? Math.floor(Date.now() / 1e3);
|
|
3028
|
+
const tolerance = options.clockTolerance ?? BackchannelLogoutConstants_default.DEFAULT_CLOCK_TOLERANCE_SECONDS;
|
|
3029
|
+
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.");
|
|
3030
|
+
if (typeof payload["exp"] !== "number" || payload["exp"] <= now - tolerance) return fail("JS-LOGOUT_TOKEN-VLTC-IV09", "The token has expired.");
|
|
3031
|
+
if ("sid" in payload && !isNonEmptyString(payload["sid"])) return fail("JS-LOGOUT_TOKEN-VLTC-IV10", "The session identifier is not valid.");
|
|
3032
|
+
if ("sub" in payload && !isNonEmptyString(payload["sub"])) return fail("JS-LOGOUT_TOKEN-VLTC-IV10", "The subject is not valid.");
|
|
3033
|
+
if (!("sid" in payload) && !("sub" in payload)) return fail("JS-LOGOUT_TOKEN-VLTC-IV11", "The token names neither a session nor a subject.");
|
|
3034
|
+
if (!isNonEmptyString(payload["jti"])) return fail("JS-LOGOUT_TOKEN-VLTC-IV12", "The token identifier is missing.");
|
|
3035
|
+
return payload;
|
|
3036
|
+
};
|
|
3037
|
+
var validateLogoutTokenClaims_default = validateLogoutTokenClaims;
|
|
3038
|
+
|
|
2313
3039
|
//#endregion
|
|
2314
3040
|
//#region src/constants/TokenExchangeConstants.ts
|
|
2315
3041
|
/**
|
|
@@ -2350,6 +3076,9 @@ var AuthenticationHelper = class {
|
|
|
2350
3076
|
config;
|
|
2351
3077
|
oidcProviderMetaData;
|
|
2352
3078
|
cryptoHelper;
|
|
3079
|
+
jwksCache;
|
|
3080
|
+
jwksFetch;
|
|
3081
|
+
jwksFetchStartedAt = 0;
|
|
2353
3082
|
/**
|
|
2354
3083
|
* Creates a new `AuthenticationHelper` instance.
|
|
2355
3084
|
*
|
|
@@ -2454,6 +3183,83 @@ var AuthenticationHelper = class {
|
|
|
2454
3183
|
* @throws {ThunderIDAuthException} When the JWKS endpoint is missing or the request fails.
|
|
2455
3184
|
*/
|
|
2456
3185
|
async validateIdToken(idToken) {
|
|
3186
|
+
const keys = await this.fetchJwks();
|
|
3187
|
+
const { issuer } = await this.oidcProviderMetaData();
|
|
3188
|
+
const jwk = await this.cryptoHelper.getJWKForTheIdToken(idToken.split(".")[0], keys);
|
|
3189
|
+
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);
|
|
3190
|
+
}
|
|
3191
|
+
/**
|
|
3192
|
+
* Validates a back-channel logout token: its type, event, issuer, audience and lifetime, then its
|
|
3193
|
+
* signature against the server's keys. The claims are checked first, so a malformed token costs
|
|
3194
|
+
* neither a key fetch nor a signature check.
|
|
3195
|
+
*
|
|
3196
|
+
* @param logoutToken - The raw `logout_token` the server posted.
|
|
3197
|
+
* @returns The token's claims.
|
|
3198
|
+
* @throws {InvalidLogoutTokenError} When the token is not valid.
|
|
3199
|
+
*/
|
|
3200
|
+
async validateLogoutToken(logoutToken) {
|
|
3201
|
+
const malformed = new InvalidLogoutTokenError("JS-AUTH_HELPER-VLT-IV01", "The logout token is not a signed JWT.");
|
|
3202
|
+
if (typeof logoutToken !== "string" || logoutToken.split(".").length !== 3) throw malformed;
|
|
3203
|
+
const configData = await this.config();
|
|
3204
|
+
const { issuer } = await this.oidcProviderMetaData();
|
|
3205
|
+
const clockTolerance = configData.tokenValidation?.idToken?.clockTolerance ?? BackchannelLogoutConstants_default.DEFAULT_CLOCK_TOLERANCE_SECONDS;
|
|
3206
|
+
let header;
|
|
3207
|
+
let payload;
|
|
3208
|
+
try {
|
|
3209
|
+
header = this.cryptoHelper.decodeJwtHeader(logoutToken);
|
|
3210
|
+
payload = this.cryptoHelper.decodeJwtToken(logoutToken);
|
|
3211
|
+
} catch {
|
|
3212
|
+
throw malformed;
|
|
3213
|
+
}
|
|
3214
|
+
const claims = validateLogoutTokenClaims_default(header, payload, {
|
|
3215
|
+
clientId: configData.clientId ?? "",
|
|
3216
|
+
clockTolerance,
|
|
3217
|
+
issuer: issuer ?? "",
|
|
3218
|
+
supportedAlgorithms: TokenConstants_default.SignatureValidation.SUPPORTED_ALGORITHMS
|
|
3219
|
+
});
|
|
3220
|
+
await this.cryptoHelper.verifyLogoutTokenSignature(logoutToken, await this.getCachedJwk(header["kid"]), configData.clientId ?? "", issuer ?? "", claims.sub, clockTolerance);
|
|
3221
|
+
return claims;
|
|
3222
|
+
}
|
|
3223
|
+
/**
|
|
3224
|
+
* Returns the server key with the given identifier from a cached key set. An unknown identifier
|
|
3225
|
+
* triggers one re-fetch, to follow key rotation, no more often than the minimum interval: the
|
|
3226
|
+
* logout endpoint is unauthenticated, so an unbounded re-fetch would let anyone drive requests
|
|
3227
|
+
* to the server. Requests that arrive while a fetch runs share it.
|
|
3228
|
+
*/
|
|
3229
|
+
async getCachedJwk(kid) {
|
|
3230
|
+
const now = Date.now();
|
|
3231
|
+
const find = (keys) => keys.find((key) => key.kid === kid);
|
|
3232
|
+
const fresh = this.jwksCache !== void 0 && now - this.jwksCache.fetchedAt < BackchannelLogoutConstants_default.JWKS_CACHE_TTL_MS;
|
|
3233
|
+
let jwk = fresh ? find(this.jwksCache.keys) : void 0;
|
|
3234
|
+
if (!jwk && (this.jwksFetch || now - this.jwksFetchStartedAt >= BackchannelLogoutConstants_default.JWKS_MIN_REFETCH_INTERVAL_MS)) jwk = find(await this.fetchJwksOnce());
|
|
3235
|
+
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.");
|
|
3236
|
+
if (!jwk) throw new InvalidLogoutTokenError("JS-AUTH_HELPER-GCJ-NF01", "The logout token names a key the server does not publish.");
|
|
3237
|
+
return jwk;
|
|
3238
|
+
}
|
|
3239
|
+
/**
|
|
3240
|
+
* Fetches the key set unless a fetch is already running, in which case that one is shared.
|
|
3241
|
+
*/
|
|
3242
|
+
fetchJwksOnce() {
|
|
3243
|
+
if (!this.jwksFetch) {
|
|
3244
|
+
this.jwksFetchStartedAt = Date.now();
|
|
3245
|
+
this.jwksFetch = this.fetchJwks().then((keys) => {
|
|
3246
|
+
this.jwksCache = {
|
|
3247
|
+
fetchedAt: Date.now(),
|
|
3248
|
+
keys
|
|
3249
|
+
};
|
|
3250
|
+
return keys;
|
|
3251
|
+
}).finally(() => {
|
|
3252
|
+
this.jwksFetch = void 0;
|
|
3253
|
+
});
|
|
3254
|
+
}
|
|
3255
|
+
return this.jwksFetch;
|
|
3256
|
+
}
|
|
3257
|
+
/**
|
|
3258
|
+
* Fetches the server's JSON Web Key Set.
|
|
3259
|
+
*
|
|
3260
|
+
* @throws {ThunderIDAuthException} When the JWKS endpoint is missing or the request fails.
|
|
3261
|
+
*/
|
|
3262
|
+
async fetchJwks() {
|
|
2457
3263
|
const jwksEndpoint = (await this.storageManager.loadOpenIDProviderConfiguration()).jwks_uri;
|
|
2458
3264
|
const configData = await this.config();
|
|
2459
3265
|
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.");
|
|
@@ -2464,10 +3270,8 @@ var AuthenticationHelper = class {
|
|
|
2464
3270
|
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.");
|
|
2465
3271
|
}
|
|
2466
3272
|
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());
|
|
2467
|
-
const { issuer } = await this.oidcProviderMetaData();
|
|
2468
3273
|
const { keys } = await response.json();
|
|
2469
|
-
|
|
2470
|
-
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);
|
|
3274
|
+
return keys;
|
|
2471
3275
|
}
|
|
2472
3276
|
/**
|
|
2473
3277
|
* Extracts user information from a decoded ID token payload.
|
|
@@ -2872,6 +3676,14 @@ var ThunderIDJavaScriptClient = class {
|
|
|
2872
3676
|
async decodeJwtToken(token) {
|
|
2873
3677
|
return this.cryptoHelper.decodeJwtToken(token);
|
|
2874
3678
|
}
|
|
3679
|
+
/**
|
|
3680
|
+
* Validates a back-channel logout token and returns its claims. Protected, because only an SDK
|
|
3681
|
+
* that runs on a server can receive one; such an SDK builds its logout handler on this.
|
|
3682
|
+
*/
|
|
3683
|
+
async validateLogoutToken(logoutToken) {
|
|
3684
|
+
await this.loadOpenIDProviderConfiguration(false);
|
|
3685
|
+
return this.authHelper.validateLogoutToken(logoutToken);
|
|
3686
|
+
}
|
|
2875
3687
|
async exchangeToken(config, sessionId) {
|
|
2876
3688
|
if (!await this.storageManager.getTemporaryDataParameter(OIDCDiscoveryConstants_default.Storage.StorageKeys.OPENID_PROVIDER_CONFIG_INITIATED)) await this.loadOpenIDProviderConfiguration(false);
|
|
2877
3689
|
const oidcProviderMetadata = await this.oidcProviderMetaDataProvider();
|
|
@@ -4312,6 +5124,182 @@ const resolveFieldName = (field) => {
|
|
|
4312
5124
|
};
|
|
4313
5125
|
var resolveFieldName_default = resolveFieldName;
|
|
4314
5126
|
|
|
5127
|
+
//#endregion
|
|
5128
|
+
//#region src/utils/evaluatePasswordPolicy.ts
|
|
5129
|
+
/**
|
|
5130
|
+
* Evaluates a password against a policy, returning one result when the policy configures
|
|
5131
|
+
* a `regex` and none otherwise.
|
|
5132
|
+
*
|
|
5133
|
+
* An uncompilable `regex` is treated as passing, matching `evaluateValidationRule`:
|
|
5134
|
+
* the SDK stays lenient so a misconfigured schema cannot lock a user out of their own
|
|
5135
|
+
* password change.
|
|
5136
|
+
*
|
|
5137
|
+
* @param value - The candidate password.
|
|
5138
|
+
* @param policy - The rule to apply.
|
|
5139
|
+
* @returns A single-item list when `policy.regex` is set, otherwise an empty list.
|
|
5140
|
+
* @example
|
|
5141
|
+
* ```typescript
|
|
5142
|
+
* const results = evaluatePasswordPolicy('sh0rt', {regex: '^.{8,}$'});
|
|
5143
|
+
* const isValid = results.every(result => result.passed);
|
|
5144
|
+
* ```
|
|
5145
|
+
*/
|
|
5146
|
+
const evaluatePasswordPolicy = (value, policy) => {
|
|
5147
|
+
if (!policy.regex) return [];
|
|
5148
|
+
let matches = true;
|
|
5149
|
+
try {
|
|
5150
|
+
matches = new RegExp(policy.regex).test(value);
|
|
5151
|
+
} catch {
|
|
5152
|
+
matches = true;
|
|
5153
|
+
}
|
|
5154
|
+
return [{
|
|
5155
|
+
key: "regex",
|
|
5156
|
+
messageKey: "validation.password.pattern",
|
|
5157
|
+
passed: matches
|
|
5158
|
+
}];
|
|
5159
|
+
};
|
|
5160
|
+
var evaluatePasswordPolicy_default = evaluatePasswordPolicy;
|
|
5161
|
+
|
|
5162
|
+
//#endregion
|
|
5163
|
+
//#region src/utils/evaluateChangePasswordForm.ts
|
|
5164
|
+
/**
|
|
5165
|
+
* Evaluates a change-password form against a policy.
|
|
5166
|
+
*
|
|
5167
|
+
* Every predicate a change-password UI needs is derived here so the React and Vue
|
|
5168
|
+
* components stay pure rendering concerns and cannot drift apart on what counts as a
|
|
5169
|
+
* submittable form.
|
|
5170
|
+
*
|
|
5171
|
+
* @param values - The current field values.
|
|
5172
|
+
* @param policy - The rules the new password must satisfy.
|
|
5173
|
+
* @returns The derived flags plus the per-rule results.
|
|
5174
|
+
* @example
|
|
5175
|
+
* ```typescript
|
|
5176
|
+
* const {isValid, ruleResults} = evaluateChangePasswordForm(
|
|
5177
|
+
* {confirmPassword, newPassword},
|
|
5178
|
+
* {regex: '^.{12,}$'},
|
|
5179
|
+
* );
|
|
5180
|
+
* const canSubmit = !loading && isValid;
|
|
5181
|
+
* ```
|
|
5182
|
+
*/
|
|
5183
|
+
const evaluateChangePasswordForm = (values, policy) => {
|
|
5184
|
+
const { confirmPassword, newPassword } = values;
|
|
5185
|
+
const ruleResults = evaluatePasswordPolicy_default(newPassword, policy);
|
|
5186
|
+
const meetsPolicy = ruleResults.every((rule) => rule.passed);
|
|
5187
|
+
const confirmMatches = newPassword === confirmPassword;
|
|
5188
|
+
return {
|
|
5189
|
+
confirmMatches,
|
|
5190
|
+
isValid: newPassword !== "" && confirmPassword !== "" && meetsPolicy && confirmMatches,
|
|
5191
|
+
meetsPolicy,
|
|
5192
|
+
ruleResults
|
|
5193
|
+
};
|
|
5194
|
+
};
|
|
5195
|
+
var evaluateChangePasswordForm_default = evaluateChangePasswordForm;
|
|
5196
|
+
|
|
5197
|
+
//#endregion
|
|
5198
|
+
//#region src/utils/resolveChangeCredentialPolicy.ts
|
|
5199
|
+
/**
|
|
5200
|
+
* Resolves the rules a change-credential form should enforce for the given credential.
|
|
5201
|
+
*
|
|
5202
|
+
* The organization's own policy, expressed as the credential attribute's `regex` in
|
|
5203
|
+
* `GET /users/me/meta`, is the sole source of truth: the SDK does not layer its own
|
|
5204
|
+
* character-class or length rules on top, since doing so could reject a value the
|
|
5205
|
+
* organization's policy accepts. When the schema carries no regex for this credential,
|
|
5206
|
+
* there is no policy to check client-side and the requirement checklist is simply empty.
|
|
5207
|
+
*
|
|
5208
|
+
* @param userSchema - The user type schema resolved by the provider, keyed by attribute.
|
|
5209
|
+
* @param attribute - The credential attribute this form manages (e.g. `password`, `pin`).
|
|
5210
|
+
* @param override - An explicit policy supplied by the caller, which wins outright.
|
|
5211
|
+
* @returns The policy to hand to {@link evaluatePasswordPolicy}.
|
|
5212
|
+
* @example
|
|
5213
|
+
* ```typescript
|
|
5214
|
+
* const policy = resolveChangeCredentialPolicy(userSchema, 'pin', undefined);
|
|
5215
|
+
* const results = evaluatePasswordPolicy(candidate, policy);
|
|
5216
|
+
* ```
|
|
5217
|
+
*/
|
|
5218
|
+
const resolveChangeCredentialPolicy = (userSchema, attribute, override) => {
|
|
5219
|
+
if (override) return override;
|
|
5220
|
+
const schemaRegex = userSchema?.[attribute]?.regex;
|
|
5221
|
+
return schemaRegex ? { regex: schemaRegex } : {};
|
|
5222
|
+
};
|
|
5223
|
+
var resolveChangeCredentialPolicy_default = resolveChangeCredentialPolicy;
|
|
5224
|
+
|
|
5225
|
+
//#endregion
|
|
5226
|
+
//#region src/utils/supportsCredential.ts
|
|
5227
|
+
/**
|
|
5228
|
+
* Whether the signed-in user's type allows them to set the given credential for themselves.
|
|
5229
|
+
*
|
|
5230
|
+
* The user type schema from `GET /users/me/meta` is the only thing a client can check before
|
|
5231
|
+
* rendering. It says whether the credential is declared on this type at all, which is a property
|
|
5232
|
+
* of the type rather than of the account, so it cannot say whether this particular user has one
|
|
5233
|
+
* stored today. That second question is the server's to answer.
|
|
5234
|
+
*
|
|
5235
|
+
* Without this check the form would submit into a guaranteed failure. `POST
|
|
5236
|
+
* /users/me/update-credentials` rejects a write for a name not declared on the type, since the
|
|
5237
|
+
* entity layer only accepts schema-declared credential keys.
|
|
5238
|
+
*
|
|
5239
|
+
* An absent schema means the answer is not known yet, either because the profile is still loading
|
|
5240
|
+
* or because the consuming app never supplied one. Both resolve to `true` so a change-credential
|
|
5241
|
+
* affordance is never hidden on missing information alone, and so apps that do not wire up
|
|
5242
|
+
* `userSchema` keep the behaviour they had before this check existed.
|
|
5243
|
+
*
|
|
5244
|
+
* @param userSchema - The user type schema resolved by the provider, keyed by attribute.
|
|
5245
|
+
* @param attribute - The credential attribute to check (e.g. `password`, `pin`).
|
|
5246
|
+
* @returns `false` only when the schema is known and either defines no attribute named
|
|
5247
|
+
* `attribute` or defines one that isn't marked `credential: true`.
|
|
5248
|
+
* @example
|
|
5249
|
+
* ```typescript
|
|
5250
|
+
* if (!supportsCredential(userSchema, 'pin')) {
|
|
5251
|
+
* return null;
|
|
5252
|
+
* }
|
|
5253
|
+
* ```
|
|
5254
|
+
*/
|
|
5255
|
+
const supportsCredential = (userSchema, attribute) => {
|
|
5256
|
+
if (!userSchema) return true;
|
|
5257
|
+
return userSchema[attribute]?.credential === true;
|
|
5258
|
+
};
|
|
5259
|
+
var supportsCredential_default = supportsCredential;
|
|
5260
|
+
|
|
5261
|
+
//#endregion
|
|
5262
|
+
//#region src/utils/mapCredentialUpdateError.ts
|
|
5263
|
+
/**
|
|
5264
|
+
* Maps a failure from the credential write path onto the field that caused it.
|
|
5265
|
+
*
|
|
5266
|
+
* `400` is the new password failing a server-side check. Everything else, including a
|
|
5267
|
+
* `403`, has no single field to blame here: this form collects no current-value field for
|
|
5268
|
+
* a `403` to attach to, since the server does not verify one on this path today.
|
|
5269
|
+
*
|
|
5270
|
+
* @param error - The value thrown by the credential update call.
|
|
5271
|
+
* @returns Where to show the failure and what to show.
|
|
5272
|
+
* @example
|
|
5273
|
+
* ```typescript
|
|
5274
|
+
* const {field, message, messageKey} = mapCredentialUpdateError(caughtError);
|
|
5275
|
+
* const text = message ?? t(messageKey);
|
|
5276
|
+
*
|
|
5277
|
+
* if (field) {
|
|
5278
|
+
* setFieldErrors({[field]: text});
|
|
5279
|
+
* } else {
|
|
5280
|
+
* setError(text);
|
|
5281
|
+
* }
|
|
5282
|
+
* ```
|
|
5283
|
+
*/
|
|
5284
|
+
const GENERIC_MESSAGE_KEY = "user.change_password.generic.error";
|
|
5285
|
+
const mapCredentialUpdateError = (error$1) => {
|
|
5286
|
+
if ((error$1 instanceof ThunderIDAPIError ? error$1.statusCode : void 0) === 400 && error$1 instanceof ThunderIDError) return {
|
|
5287
|
+
field: "newPassword",
|
|
5288
|
+
message: error$1.message,
|
|
5289
|
+
messageKey: GENERIC_MESSAGE_KEY
|
|
5290
|
+
};
|
|
5291
|
+
if (error$1 instanceof ThunderIDError) return {
|
|
5292
|
+
field: null,
|
|
5293
|
+
message: error$1.message,
|
|
5294
|
+
messageKey: GENERIC_MESSAGE_KEY
|
|
5295
|
+
};
|
|
5296
|
+
return {
|
|
5297
|
+
field: null,
|
|
5298
|
+
messageKey: GENERIC_MESSAGE_KEY
|
|
5299
|
+
};
|
|
5300
|
+
};
|
|
5301
|
+
var mapCredentialUpdateError_default = mapCredentialUpdateError;
|
|
5302
|
+
|
|
4315
5303
|
//#endregion
|
|
4316
5304
|
//#region src/utils/resolveMeta.ts
|
|
4317
5305
|
/**
|
|
@@ -4504,6 +5492,40 @@ function resolveFlowTemplateLiterals(text, { t, meta }) {
|
|
|
4504
5492
|
});
|
|
4505
5493
|
}
|
|
4506
5494
|
|
|
5495
|
+
//#endregion
|
|
5496
|
+
//#region src/utils/parseKeyValuePairs.ts
|
|
5497
|
+
/**
|
|
5498
|
+
* Reads the label and value pairs a KEY_VALUE_LIST renders from the raw value found under its
|
|
5499
|
+
* `source` key in `additionalData`. The server publishes them as a JSON-encoded array, since
|
|
5500
|
+
* additional data carries strings, so both an array and its encoding are accepted.
|
|
5501
|
+
*
|
|
5502
|
+
* Entries that are not objects, or that carry no value, are dropped, since an empty row tells the
|
|
5503
|
+
* user nothing. Anything that is not a list of pairs yields none.
|
|
5504
|
+
*
|
|
5505
|
+
* @param raw - The raw value found under the source key.
|
|
5506
|
+
* @returns The pairs to render, empty when the value holds none.
|
|
5507
|
+
*
|
|
5508
|
+
* @example
|
|
5509
|
+
* ```typescript
|
|
5510
|
+
* parseKeyValuePairs('[{"label":"Email","value":"a@b.com"}]'); // [{label: 'Email', value: 'a@b.com'}]
|
|
5511
|
+
* parseKeyValuePairs('not json'); // []
|
|
5512
|
+
* ```
|
|
5513
|
+
*/
|
|
5514
|
+
const parseKeyValuePairs = (raw) => {
|
|
5515
|
+
let parsed = raw;
|
|
5516
|
+
if (typeof raw === "string") try {
|
|
5517
|
+
parsed = JSON.parse(raw);
|
|
5518
|
+
} catch {
|
|
5519
|
+
return [];
|
|
5520
|
+
}
|
|
5521
|
+
if (!Array.isArray(parsed)) return [];
|
|
5522
|
+
return parsed.filter((entry) => typeof entry === "object" && entry !== null && !Array.isArray(entry)).map((entry) => ({
|
|
5523
|
+
label: typeof entry["label"] === "string" ? entry["label"] : "",
|
|
5524
|
+
value: typeof entry["value"] === "string" ? entry["value"] : ""
|
|
5525
|
+
})).filter((pair) => pair.value !== "");
|
|
5526
|
+
};
|
|
5527
|
+
var parseKeyValuePairs_default = parseKeyValuePairs;
|
|
5528
|
+
|
|
4507
5529
|
//#endregion
|
|
4508
5530
|
//#region src/utils/countryCodeToFlagEmoji.ts
|
|
4509
5531
|
/**
|
|
@@ -4698,7 +5720,7 @@ const DEFAULT_VALIDATION_MESSAGE_KEYS = {
|
|
|
4698
5720
|
* - Unknown rule types are treated as passing (forward compatibility with future types).
|
|
4699
5721
|
*/
|
|
4700
5722
|
const evaluateValidationRule = (rule, value) => {
|
|
4701
|
-
const fail = () => rule.message ?? DEFAULT_VALIDATION_MESSAGE_KEYS[rule.type];
|
|
5723
|
+
const fail$1 = () => rule.message ?? DEFAULT_VALIDATION_MESSAGE_KEYS[rule.type];
|
|
4702
5724
|
switch (rule.type) {
|
|
4703
5725
|
case "regex": {
|
|
4704
5726
|
if (typeof rule.value !== "string" || rule.value === "") return null;
|
|
@@ -4708,14 +5730,14 @@ const evaluateValidationRule = (rule, value) => {
|
|
|
4708
5730
|
} catch {
|
|
4709
5731
|
return null;
|
|
4710
5732
|
}
|
|
4711
|
-
return re.test(value) ? null : fail();
|
|
5733
|
+
return re.test(value) ? null : fail$1();
|
|
4712
5734
|
}
|
|
4713
5735
|
case "minLength":
|
|
4714
5736
|
if (typeof rule.value !== "number" || Number.isNaN(rule.value)) return null;
|
|
4715
|
-
return value.length >= rule.value ? null : fail();
|
|
5737
|
+
return value.length >= rule.value ? null : fail$1();
|
|
4716
5738
|
case "maxLength":
|
|
4717
5739
|
if (typeof rule.value !== "number" || Number.isNaN(rule.value)) return null;
|
|
4718
|
-
return value.length <= rule.value ? null : fail();
|
|
5740
|
+
return value.length <= rule.value ? null : fail$1();
|
|
4719
5741
|
default: return null;
|
|
4720
5742
|
}
|
|
4721
5743
|
};
|
|
@@ -4945,6 +5967,19 @@ const en_US = {
|
|
|
4945
5967
|
"passkey.register.description": "Create a passkey to securely sign in to your account without a password.",
|
|
4946
5968
|
"user.profile.heading": "Profile",
|
|
4947
5969
|
"user.profile.update.generic.error": "An error occurred while updating your profile. Please try again.",
|
|
5970
|
+
"user.change_password.heading": "Change {credential}",
|
|
5971
|
+
"user.change_password.new.label": "New {credential}",
|
|
5972
|
+
"user.change_password.new.placeholder": "Enter your new {credentialLower}",
|
|
5973
|
+
"user.change_password.confirm.label": "Confirm New {credential}",
|
|
5974
|
+
"user.change_password.confirm.placeholder": "Re-enter your new {credentialLower}",
|
|
5975
|
+
"user.change_password.requirements.heading": "Your {credentialLower} must have:",
|
|
5976
|
+
"user.change_password.submit": "Update {credential}",
|
|
5977
|
+
"user.change_password.success": "Your {credentialLower} has been updated.",
|
|
5978
|
+
"user.change_password.mismatch.error": "{credential}s do not match.",
|
|
5979
|
+
"user.change_password.generic.error": "An error occurred while updating your {credentialLower}. Please try again.",
|
|
5980
|
+
"user.change_password.unavailable.heading": "{credential} changes unavailable",
|
|
5981
|
+
"user.change_password.unavailable.description": "Please contact your administrator.",
|
|
5982
|
+
"validation.password.pattern": "Matches the required format",
|
|
4948
5983
|
"organization.switcher.switch.organization": "Switch Organization",
|
|
4949
5984
|
"organization.switcher.loading.placeholder.organizations": "Loading organizations...",
|
|
4950
5985
|
"organization.switcher.members": "members",
|
|
@@ -4988,6 +6023,7 @@ const en_US = {
|
|
|
4988
6023
|
"errors.signup.initialization": "An error occurred while initializing. Please try again later.",
|
|
4989
6024
|
"errors.signup.flow.failure": "An error occurred during the sign-up flow. Please try again later.",
|
|
4990
6025
|
"errors.signup.flow.initialization.failure": "An error occurred while initializing the sign-up flow. Please try again later.",
|
|
6026
|
+
"errors.signup.popup.failure": "Could not continue the sign-up in the pop-up window. Please try again.",
|
|
4991
6027
|
"errors.signup.components.not.available": "Sign-up form is not available at the moment. Please try again later."
|
|
4992
6028
|
}
|
|
4993
6029
|
};
|
|
@@ -5066,6 +6102,19 @@ const fr_FR = {
|
|
|
5066
6102
|
"passkey.register.description": "Créez une clé d'accès pour vous connecter en toute sécurité à votre compte sans mot de passe.",
|
|
5067
6103
|
"user.profile.heading": "Profil",
|
|
5068
6104
|
"user.profile.update.generic.error": "Une erreur est survenue lors de la mise à jour de votre profil. Veuillez réessayer.",
|
|
6105
|
+
"user.change_password.heading": "Modifier {credential}",
|
|
6106
|
+
"user.change_password.new.label": "Nouveau {credential}",
|
|
6107
|
+
"user.change_password.new.placeholder": "Entrez votre nouveau {credentialLower}",
|
|
6108
|
+
"user.change_password.confirm.label": "Confirmer le nouveau {credential}",
|
|
6109
|
+
"user.change_password.confirm.placeholder": "Saisissez à nouveau votre nouveau {credentialLower}",
|
|
6110
|
+
"user.change_password.requirements.heading": "Votre {credentialLower} doit contenir :",
|
|
6111
|
+
"user.change_password.submit": "Mettre à jour {credential}",
|
|
6112
|
+
"user.change_password.success": "Votre {credentialLower} a été mis à jour.",
|
|
6113
|
+
"user.change_password.mismatch.error": "Les {credentialLower}s ne correspondent pas.",
|
|
6114
|
+
"user.change_password.generic.error": "Une erreur est survenue lors de la mise à jour de votre {credentialLower}. Veuillez réessayer.",
|
|
6115
|
+
"user.change_password.unavailable.heading": "Modification du {credentialLower} indisponible",
|
|
6116
|
+
"user.change_password.unavailable.description": "Veuillez contacter votre administrateur.",
|
|
6117
|
+
"validation.password.pattern": "Correspond au format requis",
|
|
5069
6118
|
"organization.switcher.switch.organization": "Changer d'organisation",
|
|
5070
6119
|
"organization.switcher.loading.placeholder.organizations": "Chargement des organisations...",
|
|
5071
6120
|
"organization.switcher.members": "membres",
|
|
@@ -5107,6 +6156,7 @@ const fr_FR = {
|
|
|
5107
6156
|
"errors.signup.initialization": "Une erreur est survenue lors de l'initialisation. Veuillez réessayer plus tard.",
|
|
5108
6157
|
"errors.signup.flow.failure": "Une erreur est survenue lors du flux d'inscription. Veuillez réessayer plus tard.",
|
|
5109
6158
|
"errors.signup.flow.initialization.failure": "Une erreur est survenue lors de l'initialisation du flux d'inscription. Veuillez réessayer plus tard.",
|
|
6159
|
+
"errors.signup.popup.failure": "Impossible de poursuivre l'inscription dans la fenêtre contextuelle. Veuillez réessayer.",
|
|
5110
6160
|
"errors.signup.components.not.available": "Le formulaire d'inscription n'est pas disponible pour le moment. Veuillez réessayer plus tard.",
|
|
5111
6161
|
"errors.signin.components.not.available": "Le formulaire de connexion n'est pas disponible pour le moment. Veuillez réessayer plus tard.",
|
|
5112
6162
|
"errors.signin.timeout": "Le temps imparti pour effectuer cette e'tape est expire'."
|
|
@@ -5187,6 +6237,19 @@ const te_IN = {
|
|
|
5187
6237
|
"passkey.register.description": "పాస్వర్డ్ లేకుండా మీ ఖాతాలోకి సురక్షితంగా సైన్ ఇన్ చేయడానికి Passkey ని సృష్టించండి.",
|
|
5188
6238
|
"user.profile.heading": "ప్రొఫైల్",
|
|
5189
6239
|
"user.profile.update.generic.error": "ప్రొఫైల్ అప్డేట్ చేస్తూ లోపం వచ్చింది. దయచేసి మళ్లీ ప్రయత్నించండి.",
|
|
6240
|
+
"user.change_password.heading": "{credential} మార్చండి",
|
|
6241
|
+
"user.change_password.new.label": "కొత్త {credential}",
|
|
6242
|
+
"user.change_password.new.placeholder": "మీ కొత్త {credentialLower} నమోదు చేయండి",
|
|
6243
|
+
"user.change_password.confirm.label": "కొత్త {credential} నిర్ధారించండి",
|
|
6244
|
+
"user.change_password.confirm.placeholder": "మీ కొత్త {credentialLower}ని మళ్లీ నమోదు చేయండి",
|
|
6245
|
+
"user.change_password.requirements.heading": "మీ {credentialLower} కింది వాటిని కలిగి ఉండాలి:",
|
|
6246
|
+
"user.change_password.submit": "{credential} నవీకరించండి",
|
|
6247
|
+
"user.change_password.success": "మీ {credentialLower} నవీకరించబడింది.",
|
|
6248
|
+
"user.change_password.mismatch.error": "{credentialLower} సరిపోలలేదు.",
|
|
6249
|
+
"user.change_password.generic.error": "మీ {credentialLower} నవీకరించేటప్పుడు లోపం వచ్చింది. దయచేసి మళ్లీ ప్రయత్నించండి.",
|
|
6250
|
+
"user.change_password.unavailable.heading": "{credential} మార్పులు అందుబాటులో లేవు",
|
|
6251
|
+
"user.change_password.unavailable.description": "దయచేసి మీ నిర్వాహకుడిని సంప్రదించండి.",
|
|
6252
|
+
"validation.password.pattern": "అవసరమైన ఫార్మాట్కు సరిపోతుంది",
|
|
5190
6253
|
"organization.switcher.switch.organization": "ఆర్గనైజేషన్ మార్చండి",
|
|
5191
6254
|
"organization.switcher.loading.placeholder.organizations": "ఆర్గనైజేషన్లు లోడ్ అవుతున్నాయి...",
|
|
5192
6255
|
"organization.switcher.members": "సభ్యులు",
|
|
@@ -5228,6 +6291,7 @@ const te_IN = {
|
|
|
5228
6291
|
"errors.signup.initialization": "ప్రారంభించేటప్పుడు లోపం వచ్చింది. దయచేసి తరువాత మళ్లీ ప్రయత్నించండి.",
|
|
5229
6292
|
"errors.signup.flow.failure": "సైన్ అప్ ప్రక్రియలో లోపం వచ్చింది. దయచేసి తరువాత మళ్లీ ప్రయత్నించండి.",
|
|
5230
6293
|
"errors.signup.flow.initialization.failure": "సైన్ అప్ ప్రక్రియను ప్రారంభించేటప్పుడు లోపం వచ్చింది. దయచేసి తరువాత మళ్లీ ప్రయత్నించండి.",
|
|
6294
|
+
"errors.signup.popup.failure": "పాప్-అప్ విండోలో సైన్ అప్ కొనసాగించడం సాధ్యం కాలేదు. దయచేసి మళ్లీ ప్రయత్నించండి.",
|
|
5231
6295
|
"errors.signup.components.not.available": "సైన్ అప్ ఫారం ప్రస్తుతం అందుబాటులో లేదు. దయచేసి తరువాత మళ్లీ ప్రయత్నించండి.",
|
|
5232
6296
|
"errors.signin.components.not.available": "సైన్ ఇన్ ఫారం ప్రస్తుతం అందుబాటులో లేదు. దయచేసి తరువాత మళ్లీ ప్రయత్నించండి.",
|
|
5233
6297
|
"errors.signin.timeout": "దశను పూర్తి చేయడానికి అనుమతించబడిన సమయం ముగిసింది."
|
|
@@ -5308,6 +6372,19 @@ const hi_IN = {
|
|
|
5308
6372
|
"passkey.register.description": "बिना पासवर्ड के अपने खाते में सुरक्षित रूप से साइन इन करने के लिए एक Passkey बनाएं।",
|
|
5309
6373
|
"user.profile.heading": "प्रोफ़ाइल",
|
|
5310
6374
|
"user.profile.update.generic.error": "प्रोफ़ाइल अपडेट करते समय त्रुटि हुई। कृपया पुनः प्रयास करें।",
|
|
6375
|
+
"user.change_password.heading": "{credential} बदलें",
|
|
6376
|
+
"user.change_password.new.label": "नया {credential}",
|
|
6377
|
+
"user.change_password.new.placeholder": "अपना नया {credentialLower} दर्ज करें",
|
|
6378
|
+
"user.change_password.confirm.label": "नए {credential} की पुष्टि करें",
|
|
6379
|
+
"user.change_password.confirm.placeholder": "अपना नया {credentialLower} फिर से दर्ज करें",
|
|
6380
|
+
"user.change_password.requirements.heading": "आपके {credentialLower} में यह होना चाहिए:",
|
|
6381
|
+
"user.change_password.submit": "{credential} अपडेट करें",
|
|
6382
|
+
"user.change_password.success": "आपका {credentialLower} अपडेट कर दिया गया है।",
|
|
6383
|
+
"user.change_password.mismatch.error": "{credential} मेल नहीं खाते।",
|
|
6384
|
+
"user.change_password.generic.error": "आपका {credentialLower} अपडेट करते समय त्रुटि हुई। कृपया पुनः प्रयास करें।",
|
|
6385
|
+
"user.change_password.unavailable.heading": "{credential} परिवर्तन उपलब्ध नहीं है",
|
|
6386
|
+
"user.change_password.unavailable.description": "कृपया अपने व्यवस्थापक से संपर्क करें।",
|
|
6387
|
+
"validation.password.pattern": "आवश्यक प्रारूप से मेल खाता है",
|
|
5311
6388
|
"organization.switcher.switch.organization": "संगठन बदलें",
|
|
5312
6389
|
"organization.switcher.loading.placeholder.organizations": "संगठन लोड हो रहे हैं...",
|
|
5313
6390
|
"organization.switcher.members": "सदस्य",
|
|
@@ -5349,6 +6426,7 @@ const hi_IN = {
|
|
|
5349
6426
|
"errors.signup.initialization": "प्रारंभीकरण के दौरान एक त्रुटि हुई। कृपया बाद में पुनः प्रयास करें।",
|
|
5350
6427
|
"errors.signup.flow.failure": "साइन-अप प्रक्रिया में त्रुटि। कृपया बाद में पुनः प्रयास करें।",
|
|
5351
6428
|
"errors.signup.flow.initialization.failure": "साइन-अप प्रक्रिया प्रारंभ करते समय त्रुटि। कृपया बाद में पुनः प्रयास करें।",
|
|
6429
|
+
"errors.signup.popup.failure": "पॉप-अप विंडो में साइन-अप जारी नहीं रखा जा सका। कृपया पुनः प्रयास करें।",
|
|
5352
6430
|
"errors.signup.components.not.available": "साइन-अप फॉर्म फिलहाल उपलब्ध नहीं है। कृपया बाद में पुनः प्रयास करें।",
|
|
5353
6431
|
"errors.signin.components.not.available": "साइन-इन फॉर्म फिलहाल उपलब्ध नहीं है। कृपया बाद में पुनः प्रयास करें।",
|
|
5354
6432
|
"errors.signin.timeout": "स्टेप पूरा करने के लिए दिया गया समय खत्म हो गया है।"
|
|
@@ -5429,6 +6507,19 @@ const pt_BR = {
|
|
|
5429
6507
|
"passkey.register.description": "Crie uma passkey para entrar em sua conta com segurança sem uma senha.",
|
|
5430
6508
|
"user.profile.heading": "Perfil",
|
|
5431
6509
|
"user.profile.update.generic.error": "Ocorreu um erro ao atualizar seu perfil. Tente novamente.",
|
|
6510
|
+
"user.change_password.heading": "Alterar {credential}",
|
|
6511
|
+
"user.change_password.new.label": "Novo {credential}",
|
|
6512
|
+
"user.change_password.new.placeholder": "Digite seu novo {credentialLower}",
|
|
6513
|
+
"user.change_password.confirm.label": "Confirmar novo {credential}",
|
|
6514
|
+
"user.change_password.confirm.placeholder": "Digite novamente seu novo {credentialLower}",
|
|
6515
|
+
"user.change_password.requirements.heading": "Seu {credentialLower} deve conter:",
|
|
6516
|
+
"user.change_password.submit": "Atualizar {credential}",
|
|
6517
|
+
"user.change_password.success": "Seu {credentialLower} foi atualizado.",
|
|
6518
|
+
"user.change_password.mismatch.error": "Os {credentialLower}s não coincidem.",
|
|
6519
|
+
"user.change_password.generic.error": "Ocorreu um erro ao atualizar seu {credentialLower}. Tente novamente.",
|
|
6520
|
+
"user.change_password.unavailable.heading": "Alteração de {credentialLower} indisponível",
|
|
6521
|
+
"user.change_password.unavailable.description": "Entre em contato com o administrador.",
|
|
6522
|
+
"validation.password.pattern": "Corresponde ao formato exigido",
|
|
5432
6523
|
"organization.switcher.switch.organization": "Trocar Organização",
|
|
5433
6524
|
"organization.switcher.loading.placeholder.organizations": "Carregando organizações...",
|
|
5434
6525
|
"organization.switcher.members": "membros",
|
|
@@ -5470,6 +6561,7 @@ const pt_BR = {
|
|
|
5470
6561
|
"errors.signup.initialization": "Ocorreu um erro durante a inicialização. Tente novamente mais tarde.",
|
|
5471
6562
|
"errors.signup.flow.failure": "Ocorreu um erro durante o fluxo de cadastro. Tente novamente mais tarde.",
|
|
5472
6563
|
"errors.signup.flow.initialization.failure": "Ocorreu um erro ao inicializar o fluxo de cadastro. Tente novamente mais tarde.",
|
|
6564
|
+
"errors.signup.popup.failure": "Não foi possível continuar o cadastro na janela pop-up. Tente novamente.",
|
|
5473
6565
|
"errors.signup.components.not.available": "O formulário de cadastro não está disponível no momento. Tente novamente mais tarde.",
|
|
5474
6566
|
"errors.signin.components.not.available": "O formulário de login não está disponível no momento. Tente novamente mais tarde.",
|
|
5475
6567
|
"errors.signin.timeout": "O tempo permitido para concluir a etapa expirou."
|
|
@@ -5550,6 +6642,19 @@ const pt_PT = {
|
|
|
5550
6642
|
"passkey.register.description": "Crie uma passkey para iniciar sessão na sua conta com segurança sem palavra-passe.",
|
|
5551
6643
|
"user.profile.heading": "Perfil",
|
|
5552
6644
|
"user.profile.update.generic.error": "Ocorreu um erro ao actualizar o seu perfil. Tente novamente.",
|
|
6645
|
+
"user.change_password.heading": "Alterar {credential}",
|
|
6646
|
+
"user.change_password.new.label": "Novo {credential}",
|
|
6647
|
+
"user.change_password.new.placeholder": "Introduza o seu novo {credentialLower}",
|
|
6648
|
+
"user.change_password.confirm.label": "Confirmar novo {credential}",
|
|
6649
|
+
"user.change_password.confirm.placeholder": "Introduza novamente o seu novo {credentialLower}",
|
|
6650
|
+
"user.change_password.requirements.heading": "O seu {credentialLower} deve conter:",
|
|
6651
|
+
"user.change_password.submit": "Atualizar {credential}",
|
|
6652
|
+
"user.change_password.success": "O seu {credentialLower} foi atualizado.",
|
|
6653
|
+
"user.change_password.mismatch.error": "Os {credentialLower}s não coincidem.",
|
|
6654
|
+
"user.change_password.generic.error": "Ocorreu um erro ao actualizar o seu {credentialLower}. Tente novamente.",
|
|
6655
|
+
"user.change_password.unavailable.heading": "Alteração de {credentialLower} indisponível",
|
|
6656
|
+
"user.change_password.unavailable.description": "Contacte o seu administrador.",
|
|
6657
|
+
"validation.password.pattern": "Corresponde ao formato exigido",
|
|
5553
6658
|
"organization.switcher.switch.organization": "Trocar Organização",
|
|
5554
6659
|
"organization.switcher.loading.placeholder.organizations": "A carregar organizações...",
|
|
5555
6660
|
"organization.switcher.members": "membros",
|
|
@@ -5591,6 +6696,7 @@ const pt_PT = {
|
|
|
5591
6696
|
"errors.signup.initialization": "Ocorreu um erro durante a inicialização. Tente novamente mais tarde.",
|
|
5592
6697
|
"errors.signup.flow.failure": "Ocorreu um erro durante o fluxo de registo. Tente novamente mais tarde.",
|
|
5593
6698
|
"errors.signup.flow.initialization.failure": "Ocorreu um erro ao inicializar o fluxo de registo. Tente novamente mais tarde.",
|
|
6699
|
+
"errors.signup.popup.failure": "Não foi possível continuar o registo na janela pop-up. Tente novamente.",
|
|
5594
6700
|
"errors.signup.components.not.available": "O formulário de registo não está disponível de momento. Tente novamente mais tarde.",
|
|
5595
6701
|
"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.",
|
|
5596
6702
|
"errors.signin.timeout": "O tempo permitido para completar a etapa expirou."
|
|
@@ -5671,6 +6777,19 @@ const ta_IN = {
|
|
|
5671
6777
|
"passkey.register.description": "கடவுச்சொல் இல்லாமல் பாதுகாப்பாக உள்நுழைய ஒரு passkey-ஐ உருவாக்கவும்.",
|
|
5672
6778
|
"user.profile.heading": "சுயவிவரம்",
|
|
5673
6779
|
"user.profile.update.generic.error": "உங்கள் சுயவிவரத்தை புதுப்பிக்கும் போது பிழை ஏற்பட்டது. மீண்டும் முயற்சிக்கவும்.",
|
|
6780
|
+
"user.change_password.heading": "{credential} மாற்றவும்",
|
|
6781
|
+
"user.change_password.new.label": "புதிய {credential}",
|
|
6782
|
+
"user.change_password.new.placeholder": "உங்கள் புதிய {credentialLower}-ஐ உள்ளிடவும்",
|
|
6783
|
+
"user.change_password.confirm.label": "புதிய {credential}-ஐ உறுதிப்படுத்தவும்",
|
|
6784
|
+
"user.change_password.confirm.placeholder": "உங்கள் புதிய {credentialLower}-ஐ மீண்டும் உள்ளிடவும்",
|
|
6785
|
+
"user.change_password.requirements.heading": "உங்கள் {credentialLower} பின்வருவனவற்றைக் கொண்டிருக்க வேண்டும்:",
|
|
6786
|
+
"user.change_password.submit": "{credential}-ஐ புதுப்பிக்கவும்",
|
|
6787
|
+
"user.change_password.success": "உங்கள் {credentialLower} புதுப்பிக்கப்பட்டது.",
|
|
6788
|
+
"user.change_password.mismatch.error": "{credentialLower} பொருந்தவில்லை.",
|
|
6789
|
+
"user.change_password.generic.error": "உங்கள் {credentialLower}-ஐ புதுப்பிக்கும் போது பிழை ஏற்பட்டது. மீண்டும் முயற்சிக்கவும்.",
|
|
6790
|
+
"user.change_password.unavailable.heading": "{credential} மாற்றங்கள் கிடைக்கவில்லை",
|
|
6791
|
+
"user.change_password.unavailable.description": "உங்கள் நிர்வாகியை தொடர்பு கொள்ளவும்.",
|
|
6792
|
+
"validation.password.pattern": "தேவையான வடிவமைப்பிற்கு பொருந்துகிறது",
|
|
5674
6793
|
"organization.switcher.switch.organization": "அமைப்பை மாற்று",
|
|
5675
6794
|
"organization.switcher.loading.placeholder.organizations": "அமைப்புகள் ஏற்றப்படுகின்றன...",
|
|
5676
6795
|
"organization.switcher.members": "உறுப்பினர்கள்",
|
|
@@ -5712,6 +6831,7 @@ const ta_IN = {
|
|
|
5712
6831
|
"errors.signup.initialization": "தொடங்கும்போது பிழை ஏற்பட்டது. பின்னர் மீண்டும் முயற்சிக்கவும்.",
|
|
5713
6832
|
"errors.signup.flow.failure": "பதிவு செய்யும் செயல்பாட்டில் பிழை ஏற்பட்டது. பின்னர் மீண்டும் முயற்சிக்கவும்.",
|
|
5714
6833
|
"errors.signup.flow.initialization.failure": "பதிவு செய்யும் செயல்பாட்டை தொடங்கும்போது பிழை ஏற்பட்டது. பின்னர் மீண்டும் முயற்சிக்கவும்.",
|
|
6834
|
+
"errors.signup.popup.failure": "பாப்-அப் சாளரத்தில் பதிவைத் தொடர முடியவில்லை. மீண்டும் முயற்சிக்கவும்.",
|
|
5715
6835
|
"errors.signup.components.not.available": "பதிவு படிவம் இப்போது கிடைக்கவில்லை. பின்னர் மீண்டும் முயற்சிக்கவும்.",
|
|
5716
6836
|
"errors.signin.components.not.available": "உள்நுழைவு படிவம் இப்போது கிடைக்கவில்லை. பின்னர் மீண்டும் முயற்சிக்கவும்.",
|
|
5717
6837
|
"errors.signin.timeout": "படிநிலையை முடிக்க அனுமதிக்கப்பட்ட நேரம் காலாவதியானது."
|
|
@@ -5792,6 +6912,19 @@ const si_LK = {
|
|
|
5792
6912
|
"passkey.register.description": "මුරපදයක් නොමැතිව ඔබේ ගිණුමට ආරක්ෂිතව ඇතුල් වීමට passkey එකක් සාදන්න.",
|
|
5793
6913
|
"user.profile.heading": "පැතිකඩ",
|
|
5794
6914
|
"user.profile.update.generic.error": "ඔබේ පැතිකඩ යාවත්කාලීන කිරීමේදී දෝෂයක් ඇතිවිය.කරුණාකර නැවත උත්සාහ කරන්න",
|
|
6915
|
+
"user.change_password.heading": "{credential} වෙනස් කරන්න",
|
|
6916
|
+
"user.change_password.new.label": "නව {credential}",
|
|
6917
|
+
"user.change_password.new.placeholder": "ඔබේ නව {credentialLower} ඇතුළත් කරන්න",
|
|
6918
|
+
"user.change_password.confirm.label": "නව {credential} තහවුරු කරන්න",
|
|
6919
|
+
"user.change_password.confirm.placeholder": "ඔබේ නව {credentialLower} නැවත ඇතුළත් කරන්න",
|
|
6920
|
+
"user.change_password.requirements.heading": "ඔබේ {credentialLower} තුළ තිබිය යුතුය:",
|
|
6921
|
+
"user.change_password.submit": "{credential} යාවත්කාලීන කරන්න",
|
|
6922
|
+
"user.change_password.success": "ඔබේ {credentialLower} යාවත්කාලීන කර ඇත.",
|
|
6923
|
+
"user.change_password.mismatch.error": "{credentialLower} නොගැලපේ.",
|
|
6924
|
+
"user.change_password.generic.error": "ඔබේ {credentialLower} යාවත්කාලීන කිරීමේදී දෝෂයක් ඇතිවිය. කරුණාකර නැවත උත්සාහ කරන්න.",
|
|
6925
|
+
"user.change_password.unavailable.heading": "{credential} වෙනස් කිරීම් ලබා ගත නොහැක",
|
|
6926
|
+
"user.change_password.unavailable.description": "කරුණාකර ඔබේ පරිපාලක සම්බන්ධ කර ගන්න.",
|
|
6927
|
+
"validation.password.pattern": "අවශ්ය ආකෘතියට ගැලපේ",
|
|
5795
6928
|
"organization.switcher.switch.organization": "සංවිධානය මාරු කරන්න",
|
|
5796
6929
|
"organization.switcher.loading.placeholder.organizations": "සංවිධාන ලෝඩ් වෙමින්...",
|
|
5797
6930
|
"organization.switcher.members": "සාමාජිකයන්",
|
|
@@ -5833,6 +6966,7 @@ const si_LK = {
|
|
|
5833
6966
|
"errors.signup.initialization": "ආරම්භ කිරීමේදී දෝෂයක් සිදු විය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.",
|
|
5834
6967
|
"errors.signup.flow.failure": "ගිණුම් තැනීමේ ක්රියාවලියේදී දෝෂයක් සිදු විය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.",
|
|
5835
6968
|
"errors.signup.flow.initialization.failure": "ගිණුම් තැනීමේ ක්රියාවලිය ආරම්භ කිරීමේදී දෝෂයක් සිදු විය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.",
|
|
6969
|
+
"errors.signup.popup.failure": "උත්පතන කවුළුවේ ගිණුම් තැනීම දිගටම කරගෙන යා නොහැකි විය. කරුණාකර නැවත උත්සාහ කරන්න.",
|
|
5836
6970
|
"errors.signup.components.not.available": "ගිණුම් තැනීමේ පිටුව දැන් ලබා ගත නොහැකිය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.",
|
|
5837
6971
|
"errors.signin.components.not.available": "ප්රවේශ වීමේ පිටුව දැන් ලබා ගත නොහැකිය. කරුණාකර පසුව නැවත උත්සාහ කරන්න.",
|
|
5838
6972
|
"errors.signin.timeout": "පියවර සම්පූර්ණ කිරීමට ලබා දී තිබූ කාලය ඉකුත් වී ඇත."
|
|
@@ -5929,4 +7063,4 @@ const normalizeTranslations = (translations) => {
|
|
|
5929
7063
|
var normalizeTranslations_default = normalizeTranslations;
|
|
5930
7064
|
|
|
5931
7065
|
//#endregion
|
|
5932
|
-
export { ApplicationNativeAuthenticationConstants_default as ApplicationNativeAuthenticationConstants, AuthenticationHelper_default as AuthenticationHelper, ConsentConstants_default as ConsentConstants, DEFAULT_THEME, DEFAULT_VALIDATION_MESSAGE_KEYS, EMOJI_URI_SCHEME, EmbeddedFlowActionVariant, EmbeddedFlowComponentType, EmbeddedFlowEventType, EmbeddedFlowResponseType, EmbeddedFlowTextVariant, EmbeddedFlowType, EmbeddedRecoveryFlowStatus, EmbeddedRecoveryFlowType, EmbeddedSignInFlowStatus, EmbeddedSignInFlowType, EmbeddedSignUpFlowStatus, EmbeddedSignUpFlowType, FieldType, FlowMetaType, FlowMode, HttpClient, IsomorphicCrypto, OIDCRequestConstants_default as OIDCRequestConstants, StorageManager_default as StorageManager, ThunderIDAPIError, ThunderIDAuthException, ThunderIDError, ThunderIDJavaScriptClient_default as ThunderIDJavaScriptClient, ThunderIDRuntimeError, TokenConstants_default as TokenConstants, TranslationBundleConstants_default as TranslationBundleConstants, VendorConstants_default as VendorConstants, arrayBufferToBase64url_default as arrayBufferToBase64url, base64urlToArrayBuffer_default as base64urlToArrayBuffer, bem_default as bem, buildValidatorFromRules_default as buildValidatorFromRules, configure as configureLogger, countryCodeToFlagEmoji, createComponentLogger, createLogger, createPackageComponentLogger, createPackageLogger, createTheme_default as createTheme, debug, deepMerge_default as deepMerge, error, evaluateValidationRule_default as evaluateValidationRule, executeEmbeddedRecoveryFlow_default as executeEmbeddedRecoveryFlow, executeEmbeddedSignInFlow_default as executeEmbeddedSignInFlow, executeEmbeddedSignUpFlow_default as executeEmbeddedSignUpFlow, executeEmbeddedUserOnboardingFlow_default as executeEmbeddedUserOnboardingFlow, extractEmojiFromUri_default as extractEmojiFromUri, extractPkceStorageKeyFromState_default as extractPkceStorageKeyFromState, extractUserClaimsFromIdToken_default as extractUserClaimsFromIdToken, formatDate_default as formatDate, generateFlattenedUserProfile_default as generateFlattenedUserProfile, get_default as get, getBaseLanguage, getDefaultI18nBundles_default as getDefaultI18nBundles, getFlowMeta_default as getFlowMeta, getLatestStateParam_default as getLatestStateParam, getOrganizationUnitChildren_default as getOrganizationUnitChildren, getRedirectBasedSignUpUrl_default as getRedirectBasedSignUpUrl, getUserInfo_default as getUserInfo, getUsersMe_default as getUsersMe, getUsersMeMeta_default as getUsersMeMeta, getVendorPrefix_default as getVendorPrefix, hasUnresolvedTranslationParams, info, isEmojiUri_default as isEmojiUri, isEmpty_default as isEmpty, isRecognizedBaseUrlPattern_default as isRecognizedBaseUrlPattern, logger_default as logger, normalizeLocaleTag, normalizeTranslations_default as normalizeTranslations, processOpenIDScopes_default as processOpenIDScopes, removeTrailingSlash_default as removeTrailingSlash, resolveFieldName_default as resolveFieldName, resolveFlowTemplateLiterals, resolveLocaleDisplayName, resolveLocaleEmoji_default as resolveLocaleEmoji, resolveMeta, resolveResourceEndpoint_default as resolveResourceEndpoint, set_default as set, startCase_default as startCase, substituteTranslationParams_default as substituteTranslationParams, updateMeProfile_default as updateMeProfile, warn, withVendorCSSClassPrefix_default as withVendorCSSClassPrefix };
|
|
7066
|
+
export { AgentQueryKeys_default as AgentQueryKeys, ApplicationNativeAuthenticationConstants_default as ApplicationNativeAuthenticationConstants, ApplicationQueryKeys_default as ApplicationQueryKeys, AuthenticationHelper_default as AuthenticationHelper, BackchannelLogoutConstants_default as BackchannelLogoutConstants, ConsentConstants_default as ConsentConstants, CredentialConstants_default as CredentialConstants, DEFAULT_THEME, DEFAULT_VALIDATION_MESSAGE_KEYS, EMOJI_URI_SCHEME, EmbeddedFlowActionVariant, EmbeddedFlowComponentType, EmbeddedFlowEventType, EmbeddedFlowResponseType, EmbeddedFlowTextVariant, EmbeddedFlowType, EmbeddedRecoveryFlowStatus, EmbeddedRecoveryFlowType, EmbeddedSignInFlowStatus, EmbeddedSignInFlowType, EmbeddedSignUpFlowStatus, EmbeddedSignUpFlowType, FieldType, FlowMetaType, FlowMode, HttpClient, InboundAuthTypes, InvalidLogoutTokenError, IsomorphicCrypto, OAuth2GrantTypes, OAuth2ResponseTypes, OIDCRequestConstants_default as OIDCRequestConstants, REFRESH_TOKEN_ISSUING_GRANTS, StorageManager_default as StorageManager, ThunderIDAPIError, ThunderIDAuthException, ThunderIDError, ThunderIDJavaScriptClient_default as ThunderIDJavaScriptClient, ThunderIDRuntimeError, TokenConstants_default as TokenConstants, TokenEndpointAuthMethods, TranslationBundleConstants_default as TranslationBundleConstants, UserQueryKeys_default as UserQueryKeys, VendorConstants_default as VendorConstants, arrayBufferToBase64url_default as arrayBufferToBase64url, base64urlToArrayBuffer_default as base64urlToArrayBuffer, bem_default as bem, buildValidatorFromRules_default as buildValidatorFromRules, configure as configureLogger, countryCodeToFlagEmoji, createAgent_default as createAgent, createApplication_default as createApplication, createComponentLogger, createLogger, createPackageComponentLogger, createPackageLogger, createTheme_default as createTheme, createUser_default as createUser, debug, deepMerge_default as deepMerge, deleteAgent_default as deleteAgent, deleteApplication_default as deleteApplication, deleteUser_default as deleteUser, error, evaluateChangePasswordForm_default as evaluateChangePasswordForm, evaluatePasswordPolicy_default as evaluatePasswordPolicy, evaluateValidationRule_default as evaluateValidationRule, executeEmbeddedRecoveryFlow_default as executeEmbeddedRecoveryFlow, executeEmbeddedSignInFlow_default as executeEmbeddedSignInFlow, executeEmbeddedSignUpFlow_default as executeEmbeddedSignUpFlow, executeEmbeddedUserOnboardingFlow_default as executeEmbeddedUserOnboardingFlow, extractEmojiFromUri_default as extractEmojiFromUri, extractPkceStorageKeyFromState_default as extractPkceStorageKeyFromState, extractUserClaimsFromIdToken_default as extractUserClaimsFromIdToken, formatDate_default as formatDate, generateFlattenedUserProfile_default as generateFlattenedUserProfile, get_default as get, getAgent_default as getAgent, getAgents_default as getAgents, getApplication_default as getApplication, getApplications_default as getApplications, getBaseLanguage, getDefaultI18nBundles_default as getDefaultI18nBundles, getFlowMeta_default as getFlowMeta, getLatestStateParam_default as getLatestStateParam, getOrganizationUnitChildren_default as getOrganizationUnitChildren, getRedirectBasedSignUpUrl_default as getRedirectBasedSignUpUrl, getUser_default as getUser, getUserInfo_default as getUserInfo, getUsers_default as getUsers, getUsersMe_default as getUsersMe, getUsersMeMeta_default as getUsersMeMeta, getVendorPrefix_default as getVendorPrefix, hasUnresolvedTranslationParams, info, isEmojiUri_default as isEmojiUri, isEmpty_default as isEmpty, isRecognizedBaseUrlPattern_default as isRecognizedBaseUrlPattern, logger_default as logger, mapCredentialUpdateError_default as mapCredentialUpdateError, normalizeLocaleTag, normalizeTranslations_default as normalizeTranslations, parseKeyValuePairs_default as parseKeyValuePairs, processOpenIDScopes_default as processOpenIDScopes, removeTrailingSlash_default as removeTrailingSlash, resolveChangeCredentialPolicy_default as resolveChangeCredentialPolicy, resolveFieldName_default as resolveFieldName, resolveFlowTemplateLiterals, resolveLocaleDisplayName, resolveLocaleEmoji_default as resolveLocaleEmoji, resolveMeta, resolveResourceEndpoint_default as resolveResourceEndpoint, set_default as set, startCase_default as startCase, substituteTranslationParams_default as substituteTranslationParams, supportsCredential_default as supportsCredential, updateAgent_default as updateAgent, updateApplication_default as updateApplication, updateMeCredentials_default as updateMeCredentials, updateMeProfile_default as updateMeProfile, updateUser_default as updateUser, validateLogoutTokenClaims_default as validateLogoutTokenClaims, warn, withVendorCSSClassPrefix_default as withVendorCSSClassPrefix };
|