@keycloakify/angular 0.2.10 → 0.2.11
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/bin/811.index.js +194 -48
- package/bin/index.js +4 -1
- package/fesm2022/keycloakify-angular-account-directives-kc-class.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-account.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-applications.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-federatedIdentity.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-log.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-password.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-sessions.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-pages-totp.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-services-account-resource-injector.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-services-i18n.mjs +3 -3
- package/fesm2022/keycloakify-angular-account-template.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-directives-attributes.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-input-type.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-is-array-with-empty-object.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-kc-sanitize.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-to-array.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-pipes-to-number.mjs +3 -3
- package/fesm2022/keycloakify-angular-lib-services-resource-injector.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-add-remove-buttons-multi-valued-attribute.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-field-errors.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-group-label.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-input-field-by-type.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-input-tag-selects.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-input-tag.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-logout-other-sessions.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-password-wrapper.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-select-tag.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-textarea-tag.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-components-user-profile-form-fields.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-directives-kc-class.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-code.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-delete-account-confirm.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-delete-credential.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-error.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-frontchannel-logout.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-idp-review-user-profile.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-info.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-config-totp.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm-override.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-confirm.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-idp-link-email.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-oauth-grant.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-oauth2-device-verify-user-code.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-otp.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-page-expired.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-passkeys-conditional-authenticate.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-password.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-config.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-recovery-authn-code-input.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-reset-otp.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-reset-password.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-update-password.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-update-profile.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-username.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-verify-email.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login-x509-info.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-login.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-logout-confirm.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-register.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-saml-post-form.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-select-authenticator.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-terms.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-update-email.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-webauthn-authenticate.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-webauthn-error.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-pages-webauthn-register.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-services-i18n.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-services-login-resource-injector.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-services-user-profile-form.mjs +3 -3
- package/fesm2022/keycloakify-angular-login-template.mjs +3 -3
- package/package.json +2 -2
package/bin/811.index.js
CHANGED
|
@@ -891,6 +891,9 @@ const quotelessJson = (obj) => {
|
|
|
891
891
|
return json.replace(/"([^"]+)":/g, "$1:");
|
|
892
892
|
};
|
|
893
893
|
class ZodError extends Error {
|
|
894
|
+
get errors() {
|
|
895
|
+
return this.issues;
|
|
896
|
+
}
|
|
894
897
|
constructor(issues) {
|
|
895
898
|
super();
|
|
896
899
|
this.issues = [];
|
|
@@ -911,9 +914,6 @@ class ZodError extends Error {
|
|
|
911
914
|
this.name = "ZodError";
|
|
912
915
|
this.issues = issues;
|
|
913
916
|
}
|
|
914
|
-
get errors() {
|
|
915
|
-
return this.issues;
|
|
916
|
-
}
|
|
917
917
|
format(_mapper) {
|
|
918
918
|
const mapper = _mapper ||
|
|
919
919
|
function (issue) {
|
|
@@ -1169,9 +1169,9 @@ function addIssueToContext(ctx, issueData) {
|
|
|
1169
1169
|
data: ctx.data,
|
|
1170
1170
|
path: ctx.path,
|
|
1171
1171
|
errorMaps: [
|
|
1172
|
-
ctx.common.contextualErrorMap,
|
|
1173
|
-
ctx.schemaErrorMap,
|
|
1174
|
-
overrideMap,
|
|
1172
|
+
ctx.common.contextualErrorMap, // contextual error map is first priority
|
|
1173
|
+
ctx.schemaErrorMap, // then schema-bound map if available
|
|
1174
|
+
overrideMap, // then global override map
|
|
1175
1175
|
overrideMap === errorMap ? undefined : errorMap, // then global default map
|
|
1176
1176
|
].filter((x) => !!x),
|
|
1177
1177
|
});
|
|
@@ -1347,35 +1347,6 @@ function processCreateParams(params) {
|
|
|
1347
1347
|
return { errorMap: customMap, description };
|
|
1348
1348
|
}
|
|
1349
1349
|
class ZodType {
|
|
1350
|
-
constructor(def) {
|
|
1351
|
-
/** Alias of safeParseAsync */
|
|
1352
|
-
this.spa = this.safeParseAsync;
|
|
1353
|
-
this._def = def;
|
|
1354
|
-
this.parse = this.parse.bind(this);
|
|
1355
|
-
this.safeParse = this.safeParse.bind(this);
|
|
1356
|
-
this.parseAsync = this.parseAsync.bind(this);
|
|
1357
|
-
this.safeParseAsync = this.safeParseAsync.bind(this);
|
|
1358
|
-
this.spa = this.spa.bind(this);
|
|
1359
|
-
this.refine = this.refine.bind(this);
|
|
1360
|
-
this.refinement = this.refinement.bind(this);
|
|
1361
|
-
this.superRefine = this.superRefine.bind(this);
|
|
1362
|
-
this.optional = this.optional.bind(this);
|
|
1363
|
-
this.nullable = this.nullable.bind(this);
|
|
1364
|
-
this.nullish = this.nullish.bind(this);
|
|
1365
|
-
this.array = this.array.bind(this);
|
|
1366
|
-
this.promise = this.promise.bind(this);
|
|
1367
|
-
this.or = this.or.bind(this);
|
|
1368
|
-
this.and = this.and.bind(this);
|
|
1369
|
-
this.transform = this.transform.bind(this);
|
|
1370
|
-
this.brand = this.brand.bind(this);
|
|
1371
|
-
this.default = this.default.bind(this);
|
|
1372
|
-
this.catch = this.catch.bind(this);
|
|
1373
|
-
this.describe = this.describe.bind(this);
|
|
1374
|
-
this.pipe = this.pipe.bind(this);
|
|
1375
|
-
this.readonly = this.readonly.bind(this);
|
|
1376
|
-
this.isNullable = this.isNullable.bind(this);
|
|
1377
|
-
this.isOptional = this.isOptional.bind(this);
|
|
1378
|
-
}
|
|
1379
1350
|
get description() {
|
|
1380
1351
|
return this._def.description;
|
|
1381
1352
|
}
|
|
@@ -1439,6 +1410,48 @@ class ZodType {
|
|
|
1439
1410
|
const result = this._parseSync({ data, path: ctx.path, parent: ctx });
|
|
1440
1411
|
return handleResult(ctx, result);
|
|
1441
1412
|
}
|
|
1413
|
+
"~validate"(data) {
|
|
1414
|
+
var _a, _b;
|
|
1415
|
+
const ctx = {
|
|
1416
|
+
common: {
|
|
1417
|
+
issues: [],
|
|
1418
|
+
async: !!this["~standard"].async,
|
|
1419
|
+
},
|
|
1420
|
+
path: [],
|
|
1421
|
+
schemaErrorMap: this._def.errorMap,
|
|
1422
|
+
parent: null,
|
|
1423
|
+
data,
|
|
1424
|
+
parsedType: getParsedType(data),
|
|
1425
|
+
};
|
|
1426
|
+
if (!this["~standard"].async) {
|
|
1427
|
+
try {
|
|
1428
|
+
const result = this._parseSync({ data, path: [], parent: ctx });
|
|
1429
|
+
return isValid(result)
|
|
1430
|
+
? {
|
|
1431
|
+
value: result.value,
|
|
1432
|
+
}
|
|
1433
|
+
: {
|
|
1434
|
+
issues: ctx.common.issues,
|
|
1435
|
+
};
|
|
1436
|
+
}
|
|
1437
|
+
catch (err) {
|
|
1438
|
+
if ((_b = (_a = err === null || err === void 0 ? void 0 : err.message) === null || _a === void 0 ? void 0 : _a.toLowerCase()) === null || _b === void 0 ? void 0 : _b.includes("encountered")) {
|
|
1439
|
+
this["~standard"].async = true;
|
|
1440
|
+
}
|
|
1441
|
+
ctx.common = {
|
|
1442
|
+
issues: [],
|
|
1443
|
+
async: true,
|
|
1444
|
+
};
|
|
1445
|
+
}
|
|
1446
|
+
}
|
|
1447
|
+
return this._parseAsync({ data, path: [], parent: ctx }).then((result) => isValid(result)
|
|
1448
|
+
? {
|
|
1449
|
+
value: result.value,
|
|
1450
|
+
}
|
|
1451
|
+
: {
|
|
1452
|
+
issues: ctx.common.issues,
|
|
1453
|
+
});
|
|
1454
|
+
}
|
|
1442
1455
|
async parseAsync(data, params) {
|
|
1443
1456
|
const result = await this.safeParseAsync(data, params);
|
|
1444
1457
|
if (result.success)
|
|
@@ -1525,6 +1538,40 @@ class ZodType {
|
|
|
1525
1538
|
superRefine(refinement) {
|
|
1526
1539
|
return this._refinement(refinement);
|
|
1527
1540
|
}
|
|
1541
|
+
constructor(def) {
|
|
1542
|
+
/** Alias of safeParseAsync */
|
|
1543
|
+
this.spa = this.safeParseAsync;
|
|
1544
|
+
this._def = def;
|
|
1545
|
+
this.parse = this.parse.bind(this);
|
|
1546
|
+
this.safeParse = this.safeParse.bind(this);
|
|
1547
|
+
this.parseAsync = this.parseAsync.bind(this);
|
|
1548
|
+
this.safeParseAsync = this.safeParseAsync.bind(this);
|
|
1549
|
+
this.spa = this.spa.bind(this);
|
|
1550
|
+
this.refine = this.refine.bind(this);
|
|
1551
|
+
this.refinement = this.refinement.bind(this);
|
|
1552
|
+
this.superRefine = this.superRefine.bind(this);
|
|
1553
|
+
this.optional = this.optional.bind(this);
|
|
1554
|
+
this.nullable = this.nullable.bind(this);
|
|
1555
|
+
this.nullish = this.nullish.bind(this);
|
|
1556
|
+
this.array = this.array.bind(this);
|
|
1557
|
+
this.promise = this.promise.bind(this);
|
|
1558
|
+
this.or = this.or.bind(this);
|
|
1559
|
+
this.and = this.and.bind(this);
|
|
1560
|
+
this.transform = this.transform.bind(this);
|
|
1561
|
+
this.brand = this.brand.bind(this);
|
|
1562
|
+
this.default = this.default.bind(this);
|
|
1563
|
+
this.catch = this.catch.bind(this);
|
|
1564
|
+
this.describe = this.describe.bind(this);
|
|
1565
|
+
this.pipe = this.pipe.bind(this);
|
|
1566
|
+
this.readonly = this.readonly.bind(this);
|
|
1567
|
+
this.isNullable = this.isNullable.bind(this);
|
|
1568
|
+
this.isOptional = this.isOptional.bind(this);
|
|
1569
|
+
this["~standard"] = {
|
|
1570
|
+
version: 1,
|
|
1571
|
+
vendor: "zod",
|
|
1572
|
+
validate: (data) => this["~validate"](data),
|
|
1573
|
+
};
|
|
1574
|
+
}
|
|
1528
1575
|
optional() {
|
|
1529
1576
|
return ZodOptional.create(this, this._def);
|
|
1530
1577
|
}
|
|
@@ -1535,7 +1582,7 @@ class ZodType {
|
|
|
1535
1582
|
return this.nullable().optional();
|
|
1536
1583
|
}
|
|
1537
1584
|
array() {
|
|
1538
|
-
return ZodArray.create(this
|
|
1585
|
+
return ZodArray.create(this);
|
|
1539
1586
|
}
|
|
1540
1587
|
promise() {
|
|
1541
1588
|
return ZodPromise.create(this, this._def);
|
|
@@ -1601,11 +1648,12 @@ class ZodType {
|
|
|
1601
1648
|
}
|
|
1602
1649
|
const cuidRegex = /^c[^\s-]{8,}$/i;
|
|
1603
1650
|
const cuid2Regex = /^[0-9a-z]+$/;
|
|
1604
|
-
const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}
|
|
1651
|
+
const ulidRegex = /^[0-9A-HJKMNP-TV-Z]{26}$/i;
|
|
1605
1652
|
// const uuidRegex =
|
|
1606
1653
|
// /^([a-f0-9]{8}-[a-f0-9]{4}-[1-5][a-f0-9]{3}-[a-f0-9]{4}-[a-f0-9]{12}|00000000-0000-0000-0000-000000000000)$/i;
|
|
1607
1654
|
const uuidRegex = /^[0-9a-fA-F]{8}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{4}\b-[0-9a-fA-F]{12}$/i;
|
|
1608
1655
|
const nanoidRegex = /^[a-z0-9_-]{21}$/i;
|
|
1656
|
+
const jwtRegex = /^[A-Za-z0-9-_]+\.[A-Za-z0-9-_]+\.[A-Za-z0-9-_]*$/;
|
|
1609
1657
|
const durationRegex = /^[-+]?P(?!$)(?:(?:[-+]?\d+Y)|(?:[-+]?\d+[.,]\d+Y$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:(?:[-+]?\d+W)|(?:[-+]?\d+[.,]\d+W$))?(?:(?:[-+]?\d+D)|(?:[-+]?\d+[.,]\d+D$))?(?:T(?=[\d+-])(?:(?:[-+]?\d+H)|(?:[-+]?\d+[.,]\d+H$))?(?:(?:[-+]?\d+M)|(?:[-+]?\d+[.,]\d+M$))?(?:[-+]?\d+(?:[.,]\d+)?S)?)??$/;
|
|
1610
1658
|
// from https://stackoverflow.com/a/46181/1550155
|
|
1611
1659
|
// old version: too slow, didn't support unicode
|
|
@@ -1627,9 +1675,15 @@ const _emojiRegex = `^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$`;
|
|
|
1627
1675
|
let emojiRegex;
|
|
1628
1676
|
// faster, simpler, safer
|
|
1629
1677
|
const ipv4Regex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/;
|
|
1630
|
-
const
|
|
1678
|
+
const ipv4CidrRegex = /^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/(3[0-2]|[12]?[0-9])$/;
|
|
1679
|
+
// const ipv6Regex =
|
|
1680
|
+
// /^(([a-f0-9]{1,4}:){7}|::([a-f0-9]{1,4}:){0,6}|([a-f0-9]{1,4}:){1}:([a-f0-9]{1,4}:){0,5}|([a-f0-9]{1,4}:){2}:([a-f0-9]{1,4}:){0,4}|([a-f0-9]{1,4}:){3}:([a-f0-9]{1,4}:){0,3}|([a-f0-9]{1,4}:){4}:([a-f0-9]{1,4}:){0,2}|([a-f0-9]{1,4}:){5}:([a-f0-9]{1,4}:){0,1})([a-f0-9]{1,4}|(((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2}))\.){3}((25[0-5])|(2[0-4][0-9])|(1[0-9]{2})|([0-9]{1,2})))$/;
|
|
1681
|
+
const ipv6Regex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))$/;
|
|
1682
|
+
const ipv6CidrRegex = /^(([0-9a-fA-F]{1,4}:){7,7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:)|fe80:(:[0-9a-fA-F]{0,4}){0,4}%[0-9a-zA-Z]{1,}|::(ffff(:0{1,4}){0,1}:){0,1}((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])|([0-9a-fA-F]{1,4}:){1,4}:((25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9])\.){3,3}(25[0-5]|(2[0-4]|1{0,1}[0-9]){0,1}[0-9]))\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/;
|
|
1631
1683
|
// https://stackoverflow.com/questions/7860392/determine-if-string-is-in-base64-using-javascript
|
|
1632
1684
|
const base64Regex = /^([0-9a-zA-Z+/]{4})*(([0-9a-zA-Z+/]{2}==)|([0-9a-zA-Z+/]{3}=))?$/;
|
|
1685
|
+
// https://base64.guru/standards/base64url
|
|
1686
|
+
const base64urlRegex = /^([0-9a-zA-Z-_]{4})*(([0-9a-zA-Z-_]{2}(==)?)|([0-9a-zA-Z-_]{3}(=)?))?$/;
|
|
1633
1687
|
// simple
|
|
1634
1688
|
// const dateRegexSource = `\\d{4}-\\d{2}-\\d{2}`;
|
|
1635
1689
|
// no leap year validation
|
|
@@ -1670,6 +1724,38 @@ function isValidIP(ip, version) {
|
|
|
1670
1724
|
}
|
|
1671
1725
|
return false;
|
|
1672
1726
|
}
|
|
1727
|
+
function isValidJWT(jwt, alg) {
|
|
1728
|
+
if (!jwtRegex.test(jwt))
|
|
1729
|
+
return false;
|
|
1730
|
+
try {
|
|
1731
|
+
const [header] = jwt.split(".");
|
|
1732
|
+
// Convert base64url to base64
|
|
1733
|
+
const base64 = header
|
|
1734
|
+
.replace(/-/g, "+")
|
|
1735
|
+
.replace(/_/g, "/")
|
|
1736
|
+
.padEnd(header.length + ((4 - (header.length % 4)) % 4), "=");
|
|
1737
|
+
const decoded = JSON.parse(atob(base64));
|
|
1738
|
+
if (typeof decoded !== "object" || decoded === null)
|
|
1739
|
+
return false;
|
|
1740
|
+
if (!decoded.typ || !decoded.alg)
|
|
1741
|
+
return false;
|
|
1742
|
+
if (alg && decoded.alg !== alg)
|
|
1743
|
+
return false;
|
|
1744
|
+
return true;
|
|
1745
|
+
}
|
|
1746
|
+
catch (_a) {
|
|
1747
|
+
return false;
|
|
1748
|
+
}
|
|
1749
|
+
}
|
|
1750
|
+
function isValidCidr(ip, version) {
|
|
1751
|
+
if ((version === "v4" || !version) && ipv4CidrRegex.test(ip)) {
|
|
1752
|
+
return true;
|
|
1753
|
+
}
|
|
1754
|
+
if ((version === "v6" || !version) && ipv6CidrRegex.test(ip)) {
|
|
1755
|
+
return true;
|
|
1756
|
+
}
|
|
1757
|
+
return false;
|
|
1758
|
+
}
|
|
1673
1759
|
class ZodString extends ZodType {
|
|
1674
1760
|
_parse(input) {
|
|
1675
1761
|
if (this._def.coerce) {
|
|
@@ -1951,6 +2037,28 @@ class ZodString extends ZodType {
|
|
|
1951
2037
|
status.dirty();
|
|
1952
2038
|
}
|
|
1953
2039
|
}
|
|
2040
|
+
else if (check.kind === "jwt") {
|
|
2041
|
+
if (!isValidJWT(input.data, check.alg)) {
|
|
2042
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
2043
|
+
addIssueToContext(ctx, {
|
|
2044
|
+
validation: "jwt",
|
|
2045
|
+
code: ZodIssueCode.invalid_string,
|
|
2046
|
+
message: check.message,
|
|
2047
|
+
});
|
|
2048
|
+
status.dirty();
|
|
2049
|
+
}
|
|
2050
|
+
}
|
|
2051
|
+
else if (check.kind === "cidr") {
|
|
2052
|
+
if (!isValidCidr(input.data, check.version)) {
|
|
2053
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
2054
|
+
addIssueToContext(ctx, {
|
|
2055
|
+
validation: "cidr",
|
|
2056
|
+
code: ZodIssueCode.invalid_string,
|
|
2057
|
+
message: check.message,
|
|
2058
|
+
});
|
|
2059
|
+
status.dirty();
|
|
2060
|
+
}
|
|
2061
|
+
}
|
|
1954
2062
|
else if (check.kind === "base64") {
|
|
1955
2063
|
if (!base64Regex.test(input.data)) {
|
|
1956
2064
|
ctx = this._getOrReturnCtx(input, ctx);
|
|
@@ -1962,6 +2070,17 @@ class ZodString extends ZodType {
|
|
|
1962
2070
|
status.dirty();
|
|
1963
2071
|
}
|
|
1964
2072
|
}
|
|
2073
|
+
else if (check.kind === "base64url") {
|
|
2074
|
+
if (!base64urlRegex.test(input.data)) {
|
|
2075
|
+
ctx = this._getOrReturnCtx(input, ctx);
|
|
2076
|
+
addIssueToContext(ctx, {
|
|
2077
|
+
validation: "base64url",
|
|
2078
|
+
code: ZodIssueCode.invalid_string,
|
|
2079
|
+
message: check.message,
|
|
2080
|
+
});
|
|
2081
|
+
status.dirty();
|
|
2082
|
+
}
|
|
2083
|
+
}
|
|
1965
2084
|
else {
|
|
1966
2085
|
util.assertNever(check);
|
|
1967
2086
|
}
|
|
@@ -2008,9 +2127,22 @@ class ZodString extends ZodType {
|
|
|
2008
2127
|
base64(message) {
|
|
2009
2128
|
return this._addCheck({ kind: "base64", ...errorUtil.errToObj(message) });
|
|
2010
2129
|
}
|
|
2130
|
+
base64url(message) {
|
|
2131
|
+
// base64url encoding is a modification of base64 that can safely be used in URLs and filenames
|
|
2132
|
+
return this._addCheck({
|
|
2133
|
+
kind: "base64url",
|
|
2134
|
+
...errorUtil.errToObj(message),
|
|
2135
|
+
});
|
|
2136
|
+
}
|
|
2137
|
+
jwt(options) {
|
|
2138
|
+
return this._addCheck({ kind: "jwt", ...errorUtil.errToObj(options) });
|
|
2139
|
+
}
|
|
2011
2140
|
ip(options) {
|
|
2012
2141
|
return this._addCheck({ kind: "ip", ...errorUtil.errToObj(options) });
|
|
2013
2142
|
}
|
|
2143
|
+
cidr(options) {
|
|
2144
|
+
return this._addCheck({ kind: "cidr", ...errorUtil.errToObj(options) });
|
|
2145
|
+
}
|
|
2014
2146
|
datetime(options) {
|
|
2015
2147
|
var _a, _b;
|
|
2016
2148
|
if (typeof options === "string") {
|
|
@@ -2101,8 +2233,7 @@ class ZodString extends ZodType {
|
|
|
2101
2233
|
});
|
|
2102
2234
|
}
|
|
2103
2235
|
/**
|
|
2104
|
-
*
|
|
2105
|
-
* @see {@link ZodString.min}
|
|
2236
|
+
* Equivalent to `.min(1)`
|
|
2106
2237
|
*/
|
|
2107
2238
|
nonempty(message) {
|
|
2108
2239
|
return this.min(1, errorUtil.errToObj(message));
|
|
@@ -2164,9 +2295,16 @@ class ZodString extends ZodType {
|
|
|
2164
2295
|
get isIP() {
|
|
2165
2296
|
return !!this._def.checks.find((ch) => ch.kind === "ip");
|
|
2166
2297
|
}
|
|
2298
|
+
get isCIDR() {
|
|
2299
|
+
return !!this._def.checks.find((ch) => ch.kind === "cidr");
|
|
2300
|
+
}
|
|
2167
2301
|
get isBase64() {
|
|
2168
2302
|
return !!this._def.checks.find((ch) => ch.kind === "base64");
|
|
2169
2303
|
}
|
|
2304
|
+
get isBase64url() {
|
|
2305
|
+
// base64url encoding is a modification of base64 that can safely be used in URLs and filenames
|
|
2306
|
+
return !!this._def.checks.find((ch) => ch.kind === "base64url");
|
|
2307
|
+
}
|
|
2170
2308
|
get minLength() {
|
|
2171
2309
|
let min = null;
|
|
2172
2310
|
for (const ch of this._def.checks) {
|
|
@@ -2459,17 +2597,16 @@ class ZodBigInt extends ZodType {
|
|
|
2459
2597
|
}
|
|
2460
2598
|
_parse(input) {
|
|
2461
2599
|
if (this._def.coerce) {
|
|
2462
|
-
|
|
2600
|
+
try {
|
|
2601
|
+
input.data = BigInt(input.data);
|
|
2602
|
+
}
|
|
2603
|
+
catch (_a) {
|
|
2604
|
+
return this._getInvalidInput(input);
|
|
2605
|
+
}
|
|
2463
2606
|
}
|
|
2464
2607
|
const parsedType = this._getType(input);
|
|
2465
2608
|
if (parsedType !== ZodParsedType.bigint) {
|
|
2466
|
-
|
|
2467
|
-
addIssueToContext(ctx, {
|
|
2468
|
-
code: ZodIssueCode.invalid_type,
|
|
2469
|
-
expected: ZodParsedType.bigint,
|
|
2470
|
-
received: ctx.parsedType,
|
|
2471
|
-
});
|
|
2472
|
-
return INVALID;
|
|
2609
|
+
return this._getInvalidInput(input);
|
|
2473
2610
|
}
|
|
2474
2611
|
let ctx = undefined;
|
|
2475
2612
|
const status = new ParseStatus();
|
|
@@ -2523,6 +2660,15 @@ class ZodBigInt extends ZodType {
|
|
|
2523
2660
|
}
|
|
2524
2661
|
return { status: status.value, value: input.data };
|
|
2525
2662
|
}
|
|
2663
|
+
_getInvalidInput(input) {
|
|
2664
|
+
const ctx = this._getOrReturnCtx(input);
|
|
2665
|
+
addIssueToContext(ctx, {
|
|
2666
|
+
code: ZodIssueCode.invalid_type,
|
|
2667
|
+
expected: ZodParsedType.bigint,
|
|
2668
|
+
received: ctx.parsedType,
|
|
2669
|
+
});
|
|
2670
|
+
return INVALID;
|
|
2671
|
+
}
|
|
2526
2672
|
gte(value, message) {
|
|
2527
2673
|
return this.setLimit("min", value, true, errorUtil.toString(message));
|
|
2528
2674
|
}
|
package/bin/index.js
CHANGED
|
@@ -12,7 +12,7 @@ import { createRequire as __WEBPACK_EXTERNAL_createRequire } from "module";
|
|
|
12
12
|
/* harmony export */ qA: () => (/* binding */ THEME_TYPES),
|
|
13
13
|
/* harmony export */ yp: () => (/* binding */ CUSTOM_HANDLER_ENV_NAMES)
|
|
14
14
|
/* harmony export */ });
|
|
15
|
-
/* unused harmony exports WELL_KNOWN_DIRECTORY_BASE_NAME, VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES, BUILD_FOR_KEYCLOAK_MAJOR_VERSION_ENV_NAME, CONTAINER_NAME, FALLBACK_LANGUAGE_TAG, KEYCLOAK_THEME, KEYCLOAKIFY_SPA_DEV_SERVER_PORT */
|
|
15
|
+
/* unused harmony exports WELL_KNOWN_DIRECTORY_BASE_NAME, VITE_PLUGIN_SUB_SCRIPTS_ENV_NAMES, BUILD_FOR_KEYCLOAK_MAJOR_VERSION_ENV_NAME, CONTAINER_NAME, FALLBACK_LANGUAGE_TAG, KEYCLOAK_THEME, KEYCLOAKIFY_SPA_DEV_SERVER_PORT, KEYCLOAKIFY_LOGGING_VERSION, KEYCLOAKIFY_LOGIN_JAR_BASENAME, TEST_APP_URL */
|
|
16
16
|
const WELL_KNOWN_DIRECTORY_BASE_NAME = {
|
|
17
17
|
KEYCLOAKIFY_DEV_RESOURCES: "keycloakify-dev-resources",
|
|
18
18
|
RESOURCES_COMMON: "resources-common",
|
|
@@ -80,6 +80,9 @@ const CUSTOM_HANDLER_ENV_NAMES = {
|
|
|
80
80
|
};
|
|
81
81
|
const KEYCLOAK_THEME = "keycloak-theme";
|
|
82
82
|
const KEYCLOAKIFY_SPA_DEV_SERVER_PORT = "KEYCLOAKIFY_SPA_DEV_SERVER_PORT";
|
|
83
|
+
const KEYCLOAKIFY_LOGGING_VERSION = "1.0.3";
|
|
84
|
+
const KEYCLOAKIFY_LOGIN_JAR_BASENAME = (/* unused pure expression or super */ null && (`keycloakify-logging-${KEYCLOAKIFY_LOGGING_VERSION}.jar`));
|
|
85
|
+
const TEST_APP_URL = "https://my-theme.keycloakify.dev";
|
|
83
86
|
//# sourceMappingURL=constants.js.map
|
|
84
87
|
|
|
85
88
|
/***/ }),
|
|
@@ -123,10 +123,10 @@ class KcClassDirective {
|
|
|
123
123
|
});
|
|
124
124
|
}
|
|
125
125
|
}
|
|
126
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
127
|
-
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.
|
|
126
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: KcClassDirective, deps: [], target: i0.ɵɵFactoryTarget.Directive }); }
|
|
127
|
+
static { this.ɵdir = i0.ɵɵngDeclareDirective({ minVersion: "14.0.0", version: "19.0.4", type: KcClassDirective, isStandalone: true, selector: "[kcClass]", inputs: { klass: ["class", "klass"], ngClass: "ngClass", kcClass: "kcClass" }, ngImport: i0 }); }
|
|
128
128
|
}
|
|
129
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
129
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: KcClassDirective, decorators: [{
|
|
130
130
|
type: Directive,
|
|
131
131
|
args: [{ selector: '[kcClass]', standalone: true }]
|
|
132
132
|
}], propDecorators: { klass: [{
|
|
@@ -20,15 +20,15 @@ class AccountComponent extends ComponentReference {
|
|
|
20
20
|
};
|
|
21
21
|
this.active = 'account';
|
|
22
22
|
}
|
|
23
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
24
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
23
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccountComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
24
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: AccountComponent, isStandalone: true, selector: "kc-account", providers: [
|
|
25
25
|
{
|
|
26
26
|
provide: ComponentReference,
|
|
27
27
|
useExisting: forwardRef(() => AccountComponent)
|
|
28
28
|
}
|
|
29
29
|
], usesInheritance: true, ngImport: i0, template: "@let url = kcContext.url;\n@let realm = kcContext.realm;\n@let messagesPerField = kcContext.messagesPerField;\n@let stateChecker = kcContext.stateChecker;\n@let account = kcContext.account;\n@let referrer = kcContext.referrer;\n\n<div class=\"row\">\n <div class=\"col-md-10\">\n <h2>{{ i18n.msgStr('editAccountHtmlTitle') }}</h2>\n </div>\n <div class=\"col-md-2 subtitle\">\n <span class=\"subtitle\"> <span class=\"required\">*</span> {{ i18n.msgStr('requiredFields') }} </span>\n </div>\n</div>\n<form\n class=\"form-horizontal\"\n method=\"post\"\n [action]=\"url.accountUrl\"\n>\n <input\n type=\"hidden\"\n id=\"stateChecker\"\n name=\"stateChecker\"\n [value]=\"stateChecker\"\n />\n @if (!realm.registrationEmailAsUsername) {\n <div\n class=\"form-group\"\n [ngClass]=\"{ 'has-error': messagesPerField.existsError('username') }\"\n >\n <div class=\"col-sm-2 col-md-2\">\n <label\n for=\"username\"\n class=\"control-label\"\n >\n {{ i18n.msgStr('username') }}\n </label>\n @if (realm.editUsernameAllowed) {\n <span class=\"required\">*</span>\n }\n </div>\n\n <div class=\"col-sm-10 col-md-10\">\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"username\"\n name=\"username\"\n [disabled]=\"!realm.editUsernameAllowed\"\n [defaultValue]=\"account.username ?? ''\"\n />\n </div>\n </div>\n }\n\n <div\n class=\"form-group\"\n [ngClass]=\"{ 'has-error': messagesPerField.existsError('email') }\"\n >\n <div class=\"col-sm-2 col-md-2\">\n <label\n for=\"email\"\n class=\"control-label\"\n >\n {{ i18n.msgStr('email') }}\n </label>\n <span class=\"required\">*</span>\n </div>\n\n <div class=\"col-sm-10 col-md-10\">\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"email\"\n name=\"email\"\n autoFocus\n [defaultValue]=\"account.email ?? ''\"\n />\n </div>\n </div>\n\n <div\n class=\"form-group\"\n [ngClass]=\"{ 'has-error': messagesPerField.existsError('firstName') }\"\n >\n <div class=\"col-sm-2 col-md-2\">\n <label\n for=\"firstName\"\n class=\"control-label\"\n >\n {{ i18n.msgStr('firstName') }}\n </label>\n <span class=\"required\">*</span>\n </div>\n\n <div class=\"col-sm-10 col-md-10\">\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"firstName\"\n name=\"firstName\"\n [defaultValue]=\"account.firstName\"\n />\n </div>\n </div>\n\n <div\n class=\"form-group\"\n [ngClass]=\"{ 'has-error': messagesPerField.existsError('lastName') }\"\n >\n <div class=\"col-sm-2 col-md-2\">\n <label\n for=\"lastName\"\n class=\"control-label\"\n >\n {{ i18n.msgStr('lastName') }}\n </label>\n <span class=\"required\">*</span>\n </div>\n\n <div class=\"col-sm-10 col-md-10\">\n <input\n type=\"text\"\n class=\"form-control\"\n id=\"lastName\"\n name=\"lastName\"\n [defaultValue]=\"account.lastName ?? ''\"\n />\n </div>\n </div>\n\n <div class=\"form-group\">\n <div\n id=\"kc-form-buttons\"\n class=\"col-md-offset-2 col-md-10 submit\"\n >\n <div>\n @if (referrer) {\n <a [href]=\"referrer?.url\">{{ i18n.msgStr('backToApplication') }}</a>\n }\n <button\n type=\"submit\"\n name=\"submitAction\"\n value=\"Save\"\n [kcClass]=\"['kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonLargeClass']\"\n >\n {{ i18n.msgStr('doSave') }}\n </button>\n <button\n type=\"submit\"\n name=\"submitAction\"\n value=\"Cancel\"\n [kcClass]=\"['kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonLargeClass']\"\n >\n {{ i18n.msgStr('doCancel') }}\n </button>\n </div>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }, { kind: "directive", type: NgClass, selector: "[ngClass]", inputs: ["class", "ngClass"] }] }); }
|
|
30
30
|
}
|
|
31
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
31
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: AccountComponent, decorators: [{
|
|
32
32
|
type: Component,
|
|
33
33
|
args: [{ imports: [KcClassDirective, NgClass], selector: 'kc-account', providers: [
|
|
34
34
|
{
|
|
@@ -18,15 +18,15 @@ class ApplicationsComponent extends ComponentReference {
|
|
|
18
18
|
this.classes = inject(ACCOUNT_CLASSES);
|
|
19
19
|
this.active = 'applications';
|
|
20
20
|
}
|
|
21
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
22
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
21
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApplicationsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
22
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: ApplicationsComponent, isStandalone: true, selector: "kc-applications", providers: [
|
|
23
23
|
{
|
|
24
24
|
provide: ComponentReference,
|
|
25
25
|
useExisting: forwardRef(() => ApplicationsComponent)
|
|
26
26
|
}
|
|
27
27
|
], usesInheritance: true, ngImport: i0, template: "@let url = kcContext.url;\n@let stateChecker = kcContext.stateChecker;\n@let applications = kcContext.applications?.applications;\n\n<div class=\"row\">\n <div class=\"col-md-10\">\n <h2>{{ i18n.msgStr('applicationsHtmlTitle') }}</h2>\n </div>\n\n <form\n method=\"post\"\n [action]=\"url.applicationsUrl\"\n >\n <input\n type=\"hidden\"\n id=\"stateChecker\"\n name=\"stateChecker\"\n [value]=\"stateChecker\"\n />\n <input\n type=\"hidden\"\n id=\"referrer\"\n name=\"referrer\"\n [value]=\"stateChecker\"\n />\n\n <table class=\"table table-striped table-bordered\">\n <thead>\n <tr>\n <td>{{ i18n.msgStr('application') }}</td>\n <td>{{ i18n.msgStr('availableRoles') }}</td>\n <td>{{ i18n.msgStr('grantedPermissions') }}</td>\n <td>{{ i18n.msgStr('additionalGrants') }}</td>\n <td>{{ i18n.msgStr('action') }}</td>\n </tr>\n </thead>\n\n <tbody>\n @for (application of applications ?? []; track application) {\n <tr>\n <td>\n @if (application.effectiveUrl) {\n <a [href]=\"application.effectiveUrl\">\n @if (application.client.name) {\n {{ i18n.advancedMsgStr(application.client.name) }}\n } @else {\n {{ application.client.clientId }}\n }\n </a>\n } @else {\n @if (application.client.name) {\n {{ i18n.advancedMsgStr(application.client.name) }}\n } @else {\n {{ application.client.clientId }}\n }\n }\n </td>\n\n <td>\n @if (!(application.realmRolesAvailable | isArrayWithEmptyObject)) {\n @for (role of application.realmRolesAvailable; track role; let last = $last) {\n <span>\n @if (role.description) {\n {{ i18n.advancedMsgStr(role.description) }}\n } @else {\n {{ i18n.advancedMsgStr(role.name) }}\n }\n @if (!last) {\n , \n }\n </span>\n }\n }\n @if (application.resourceRolesAvailable) {\n @for (resource of application.resourceRolesAvailable | keyvalue; track resource.key) {\n <span>\n @if (!(application.realmRolesAvailable | isArrayWithEmptyObject)) {\n , \n }\n @for (\n clientRole of application.resourceRolesAvailable[resource.key];\n track clientRole;\n let roleLast = $last\n ) {\n <span>\n {{\n i18n.advancedMsgStr(clientRole.roleDescription ? clientRole.roleDescription : clientRole.roleName)\n }}\n {{ i18n.msgStr('inResource') }}\n <strong>\n {{\n clientRole.clientName ? i18n.advancedMsgStr(clientRole.clientName) : clientRole.clientId\n }}</strong\n >\n @if (!roleLast) {\n , \n }\n </span>\n }\n </span>\n }\n }\n </td>\n\n <td>\n @if (application.client.consentRequired) {\n @for (claim of application.clientScopesGranted; track claim; let last = $last) {\n {{ i18n.advancedMsgStr(claim) }}\n @if (!last) {\n , \n }\n }\n } @else {\n <strong>{{ i18n.msgStr('fullAccess') }}</strong>\n }\n </td>\n\n <td>\n @for (grant of application.additionalGrants; track grant; let last = $last) {\n {{ i18n.advancedMsgStr(grant) }}\n @if (!last) {\n , \n }\n }\n </td>\n\n <td>\n @if (\n (application.client.consentRequired && application.clientScopesGranted.length > 0) ||\n application.additionalGrants.length > 0\n ) {\n <button\n type=\"submit\"\n name=\"clientId\"\n [kcClass]=\"['kcButtonPrimaryClass', 'kcButtonClass']\"\n [id]=\"'revoke-' + application.client.clientId\"\n [value]=\"application.client.id\"\n >\n {{ i18n.msgStr('revoke') }}\n </button>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n </form>\n</div>\n", dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }, { kind: "pipe", type: KeyValuePipe, name: "keyvalue" }, { kind: "pipe", type: IsArrayWithEmptyObjectPipe, name: "isArrayWithEmptyObject" }] }); }
|
|
28
28
|
}
|
|
29
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
29
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: ApplicationsComponent, decorators: [{
|
|
30
30
|
type: Component,
|
|
31
31
|
args: [{ imports: [KcClassDirective, NgClass, KeyValuePipe, IsArrayWithEmptyObjectPipe], selector: 'kc-applications', providers: [
|
|
32
32
|
{
|
|
@@ -17,15 +17,15 @@ class FederatedIdentityComponent extends ComponentReference {
|
|
|
17
17
|
this.classes = inject(ACCOUNT_CLASSES);
|
|
18
18
|
this.active = 'social';
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
21
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FederatedIdentityComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: FederatedIdentityComponent, isStandalone: true, selector: "kc-federatedIdentity", providers: [
|
|
22
22
|
{
|
|
23
23
|
provide: ComponentReference,
|
|
24
24
|
useExisting: forwardRef(() => FederatedIdentityComponent)
|
|
25
25
|
}
|
|
26
26
|
], usesInheritance: true, ngImport: i0, template: "@let url = kcContext.url;\n@let federatedIdentity = kcContext.federatedIdentity;\n@let stateChecker = kcContext.stateChecker;\n\n<div class=\"main-layout social\">\n <div class=\"row\">\n <div class=\"col-md-10\">\n <h2>{{ i18n.msgStr('federatedIdentitiesHtmlTitle') }}</h2>\n </div>\n </div>\n <div id=\"federated-identities\">\n @for (identity of federatedIdentity.identities; track identity) {\n <div class=\"row margin-bottom\">\n <div class=\"col-sm-2 col-md-2\">\n <label\n class=\"control-label\"\n [for]=\"identity.providerId\"\n >\n {{ identity.displayName }}\n </label>\n </div>\n <div class=\"col-sm-5 col-md-5\">\n <input\n disabled\n class=\"form-control\"\n [value]=\"identity.userName\"\n />\n </div>\n <div class=\"col-sm-5 col-md-5\">\n @if (identity.connected) {\n @if (federatedIdentity.removeLinkPossible) {\n <form\n method=\"post\"\n class=\"form-inline\"\n [action]=\"url.socialUrl\"\n >\n <input\n type=\"hidden\"\n name=\"stateChecker\"\n [value]=\"stateChecker\"\n />\n <input\n type=\"hidden\"\n name=\"action\"\n value=\"remove\"\n />\n <input\n type=\"hidden\"\n name=\"providerId\"\n [value]=\"identity.providerId\"\n />\n <button\n class=\"btn btn-default\"\n [id]=\"'remove-link-' + identity.providerId\"\n >\n {{ i18n.msgStr('doRemove') }}\n </button>\n </form>\n }\n } @else {\n <form\n method=\"post\"\n class=\"form-inline\"\n [action]=\"url.socialUrl\"\n >\n <input\n type=\"hidden\"\n name=\"stateChecker\"\n [value]=\"stateChecker\"\n />\n <input\n type=\"hidden\"\n name=\"action\"\n value=\"add\"\n />\n <input\n type=\"hidden\"\n name=\"providerId\"\n [value]=\"identity.providerId\"\n />\n <button\n class=\"btn btn-default\"\n [id]=\"'add-link-' + identity.providerId\"\n >\n {{ i18n.msgStr('doAdd') }}\n </button>\n </form>\n }\n </div>\n </div>\n }\n </div>\n</div>\n" }); }
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: FederatedIdentityComponent, decorators: [{
|
|
29
29
|
type: Component,
|
|
30
30
|
args: [{ imports: [KcClassDirective, NgClass], selector: 'kc-federatedIdentity', providers: [
|
|
31
31
|
{
|
|
@@ -17,15 +17,15 @@ class LogComponent extends ComponentReference {
|
|
|
17
17
|
this.classes = inject(ACCOUNT_CLASSES);
|
|
18
18
|
this.active = 'log';
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
21
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: LogComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: LogComponent, isStandalone: true, selector: "kc-log", providers: [
|
|
22
22
|
{
|
|
23
23
|
provide: ComponentReference,
|
|
24
24
|
useExisting: forwardRef(() => LogComponent)
|
|
25
25
|
}
|
|
26
26
|
], usesInheritance: true, ngImport: i0, template: "@let log = kcContext.log;\n\n<div [kcClass]=\"'kcContentWrapperClass'\">\n <div class=\"col-md-10\">\n <h2>{{ i18n.msgStr('accountLogHtmlTitle') }}</h2>\n </div>\n\n <table class=\"table table-striped table-bordered\">\n <thead>\n <tr>\n <td>{{ i18n.msgStr('date') }}</td>\n <td>{{ i18n.msgStr('event') }}</td>\n <td>{{ i18n.msgStr('ip') }}</td>\n <td>{{ i18n.msgStr('client') }}</td>\n <td>{{ i18n.msgStr('details') }}</td>\n </tr>\n </thead>\n\n <tbody>\n @for (event of log.events; track event) {\n <tr>\n <td>{{ event.date ? (event.date | date) : '' }}</td>\n <td>{{ event.event }}</td>\n <td>{{ event.ipAddress }}</td>\n <td>{{ event.client || '' }}</td>\n <td>\n @for (detail of event.details; track detail; let last = $last) {\n <span>\n {{ detail.key }} = {{ detail.value }}\n @if (!last) {\n , \n }\n </span>\n }\n </td>\n </tr>\n }\n </tbody>\n </table>\n</div>\n", dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }, { kind: "pipe", type: DatePipe, name: "date" }] }); }
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: LogComponent, decorators: [{
|
|
29
29
|
type: Component,
|
|
30
30
|
args: [{ imports: [KcClassDirective, NgClass, DatePipe], selector: 'kc-log', providers: [
|
|
31
31
|
{
|
|
@@ -89,15 +89,15 @@ class PasswordComponent extends ComponentReference {
|
|
|
89
89
|
this.hasNewPasswordConfirmBlurred.set(true);
|
|
90
90
|
this.checkNewPasswordConfirm(this.newPasswordConfirm());
|
|
91
91
|
}
|
|
92
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
93
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
92
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: PasswordComponent, deps: [], target: i0.ɵɵFactoryTarget.Component }); }
|
|
93
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: PasswordComponent, isStandalone: true, selector: "kc-password", providers: [
|
|
94
94
|
{
|
|
95
95
|
provide: ComponentReference,
|
|
96
96
|
useExisting: forwardRef(() => PasswordComponent)
|
|
97
97
|
}
|
|
98
98
|
], usesInheritance: true, ngImport: i0, template: "@let url = kcContext.url;\n@let password = kcContext.password;\n@let account = kcContext.account;\n@let stateChecker = kcContext.stateChecker;\n\n<div class=\"row\">\n <div class=\"col-md-10\">\n <h2>{{ i18n.msgStr('changePasswordHtmlTitle') }}</h2>\n </div>\n <div class=\"col-md-2 subtitle\">\n <span class=\"subtitle\">{{ i18n.msgStr('allFieldsRequired') }}</span>\n </div>\n</div>\n\n<form\n class=\"form-horizontal\"\n method=\"post\"\n [action]=\"url.passwordUrl\"\n>\n <input\n type=\"text\"\n id=\"username\"\n name=\"username\"\n autoComplete=\"username\"\n readOnly\n [value]=\"account.username ?? ''\"\n [style.display]=\"'none'\"\n />\n\n @if (password.passwordSet) {\n <div class=\"form-group\">\n <div class=\"col-sm-2 col-md-2\">\n <label\n for=\"password\"\n class=\"control-label\"\n >\n {{ i18n.msgStr('password') }}\n </label>\n </div>\n <div class=\"col-sm-10 col-md-10\">\n <input\n type=\"password\"\n class=\"form-control\"\n id=\"password\"\n name=\"password\"\n autoFocus\n autoComplete=\"current-password\"\n [value]=\"currentPassword()\"\n (change)=\"currentPassword.set($any($event.target).value)\"\n />\n </div>\n </div>\n }\n\n <input\n type=\"hidden\"\n id=\"stateChecker\"\n name=\"stateChecker\"\n [value]=\"stateChecker\"\n />\n\n <div class=\"form-group\">\n <div class=\"col-sm-2 col-md-2\">\n <label\n for=\"password-new\"\n class=\"control-label\"\n >\n {{ i18n.msgStr('passwordNew') }}\n </label>\n </div>\n <div class=\"col-sm-10 col-md-10\">\n <input\n type=\"password\"\n class=\"form-control\"\n id=\"password-new\"\n name=\"password-new\"\n autoComplete=\"new-password\"\n [value]=\"newPassword()\"\n (change)=\"onNewPasswordChange($any($event.target).value)\"\n (blur)=\"onNewPasswordBlur()\"\n />\n </div>\n </div>\n\n <div class=\"form-group\">\n <div class=\"col-sm-2 col-md-2\">\n <label\n for=\"password-confirm\"\n class=\"control-label two-lines\"\n >\n {{ i18n.msgStr('passwordConfirm') }}\n </label>\n </div>\n\n <div class=\"col-sm-10 col-md-10\">\n <input\n type=\"password\"\n class=\"form-control\"\n id=\"password-confirm\"\n name=\"password-confirm\"\n autoComplete=\"new-password\"\n [value]=\"newPasswordConfirm()\"\n (change)=\"onNewPasswordConfirmChange($any($event.target).value)\"\n (blur)=\"onNewPasswordConfirmBlur()\"\n />\n </div>\n </div>\n\n <div class=\"form-group\">\n <div\n id=\"kc-form-buttons\"\n class=\"col-md-offset-2 col-md-10 submit\"\n >\n <div>\n <button\n type=\"submit\"\n name=\"submitAction\"\n value=\"Save\"\n [disabled]=\"newPasswordError() !== '' || newPasswordConfirmError() !== ''\"\n [kcClass]=\"['kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonLargeClass']\"\n >\n {{ i18n.msgStr('doSave') }}\n </button>\n </div>\n </div>\n </div>\n</form>\n", dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }] }); }
|
|
99
99
|
}
|
|
100
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
100
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: PasswordComponent, decorators: [{
|
|
101
101
|
type: Component,
|
|
102
102
|
args: [{ imports: [KcClassDirective, NgClass], selector: 'kc-password', providers: [
|
|
103
103
|
{
|
|
@@ -17,15 +17,15 @@ class SessionsComponent extends ComponentReference {
|
|
|
17
17
|
this.classes = inject(ACCOUNT_CLASSES);
|
|
18
18
|
this.active = 'sessions';
|
|
19
19
|
}
|
|
20
|
-
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.
|
|
21
|
-
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.
|
|
20
|
+
static { this.ɵfac = i0.ɵɵngDeclareFactory({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SessionsComponent, deps: null, target: i0.ɵɵFactoryTarget.Component }); }
|
|
21
|
+
static { this.ɵcmp = i0.ɵɵngDeclareComponent({ minVersion: "17.0.0", version: "19.0.4", type: SessionsComponent, isStandalone: true, selector: "kc-sessions", providers: [
|
|
22
22
|
{
|
|
23
23
|
provide: ComponentReference,
|
|
24
24
|
useExisting: forwardRef(() => SessionsComponent)
|
|
25
25
|
}
|
|
26
26
|
], usesInheritance: true, ngImport: i0, template: "@let url = kcContext.url;\n@let sessions = kcContext.sessions;\n@let stateChecker = kcContext.stateChecker;\n\n<div [kcClass]=\"'kcContentWrapperClass'\">\n <div class=\"col-md-10\">\n <h2>{{ i18n.msgStr('sessionsHtmlTitle') }}</h2>\n </div>\n</div>\n\n<table class=\"table table-striped table-bordered\">\n <thead>\n <tr>\n <th>{{ i18n.msgStr('ip') }}</th>\n <th>{{ i18n.msgStr('started') }}</th>\n <th>{{ i18n.msgStr('lastAccess') }}</th>\n <th>{{ i18n.msgStr('expires') }}</th>\n <th>{{ i18n.msgStr('clients') }}</th>\n </tr>\n </thead>\n\n <tbody role=\"rowgroup\">\n @for (session of sessions.sessions; track session) {\n <tr>\n <td>{{ session.ipAddress }}</td>\n <td>{{ session?.started }}</td>\n <td>{{ session?.lastAccess }}</td>\n <td>{{ session?.expires }}</td>\n <td>\n @for (client of session.clients; track client) {\n <div>\n {{ client }}\n <br />\n </div>\n }\n </td>\n </tr>\n }\n </tbody>\n</table>\n\n<form\n method=\"post\"\n [action]=\"url.sessionsUrl\"\n>\n <input\n type=\"hidden\"\n id=\"stateChecker\"\n name=\"stateChecker\"\n [value]=\"stateChecker\"\n />\n <button\n id=\"logout-all-sessions\"\n type=\"submit\"\n [kcClass]=\"['kcButtonDefaultClass', 'kcButtonClass']\"\n >\n {{ i18n.msgStr('doLogOutAllSessions') }}\n </button>\n</form>\n", dependencies: [{ kind: "directive", type: KcClassDirective, selector: "[kcClass]", inputs: ["class", "ngClass", "kcClass"] }] }); }
|
|
27
27
|
}
|
|
28
|
-
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.
|
|
28
|
+
i0.ɵɵngDeclareClassMetadata({ minVersion: "12.0.0", version: "19.0.4", ngImport: i0, type: SessionsComponent, decorators: [{
|
|
29
29
|
type: Component,
|
|
30
30
|
args: [{ imports: [KcClassDirective, NgClass], selector: 'kc-sessions', providers: [
|
|
31
31
|
{
|