@keycloakify/angular 0.0.1-rc.0 → 0.0.1-rc.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/account/DefaultPage.d.ts +38 -0
- package/account/DefaultPage.js +34 -0
- package/account/KcContext.d.ts +1 -0
- package/account/KcContext.js +2 -0
- package/account/classes/component-reference.class.d.ts +6 -0
- package/account/classes/component-reference.class.js +3 -0
- package/account/containers/template.component.d.ts +26 -0
- package/account/containers/template.component.js +66 -0
- package/account/directives/kc-class.directive.d.ts +26 -0
- package/account/directives/kc-class.directive.js +137 -0
- package/account/i18n.d.ts +4 -0
- package/account/i18n.js +2 -0
- package/account/pages/account/account.component.d.ts +14 -0
- package/account/pages/account/account.component.js +39 -0
- package/account/pages/applications/applications.component.d.ts +13 -0
- package/account/pages/applications/applications.component.js +37 -0
- package/account/pages/federatedIdentity/federatedIdentity.component.d.ts +13 -0
- package/account/pages/federatedIdentity/federatedIdentity.component.js +36 -0
- package/account/pages/log/log.component.d.ts +13 -0
- package/account/pages/log/log.component.js +36 -0
- package/account/pages/password/password.component.d.ts +28 -0
- package/account/pages/password/password.component.js +107 -0
- package/account/pages/sessions/sessions.component.d.ts +13 -0
- package/account/pages/sessions/sessions.component.js +36 -0
- package/account/pages/totp/totp.component.d.ts +13 -0
- package/account/pages/totp/totp.component.js +37 -0
- package/account/providers/keycloakify-angular.providers.d.ts +15 -0
- package/account/providers/keycloakify-angular.providers.js +48 -0
- package/account/services/i18n.service.d.ts +6 -0
- package/account/services/i18n.service.js +12 -0
- package/account/services/resource-injector.service.d.ts +10 -0
- package/account/services/resource-injector.service.js +37 -0
- package/account/tokens/classes.token.d.ts +16 -0
- package/account/tokens/classes.token.js +3 -0
- package/account/tokens/i18n.token.d.ts +2 -0
- package/account/tokens/i18n.token.js +3 -0
- package/account/tokens/kc-context.token.d.ts +3 -0
- package/account/tokens/kc-context.token.js +3 -0
- package/lib/directives/attributes.directive.d.ts +8 -0
- package/lib/directives/attributes.directive.js +26 -0
- package/lib/models/script.model.js +1 -1
- package/lib/pipes/input-type.pipe.d.ts +7 -0
- package/lib/pipes/input-type.pipe.js +20 -0
- package/lib/pipes/is-array-with-empty-object.pipe.d.ts +7 -0
- package/lib/pipes/is-array-with-empty-object.pipe.js +20 -0
- package/lib/pipes/kc-sanitize.pipe.d.ts +9 -0
- package/lib/pipes/kc-sanitize.pipe.js +29 -0
- package/lib/pipes/to-array.pipe.d.ts +7 -0
- package/lib/pipes/to-array.pipe.js +21 -0
- package/lib/pipes/to-number.pipe.d.ts +7 -0
- package/lib/pipes/to-number.pipe.js +20 -0
- package/lib/services/resource-injector.service.d.ts +5 -2
- package/lib/services/resource-injector.service.js +19 -22
- package/lib/tokens/use-default-css.token.d.ts +2 -0
- package/lib/tokens/use-default-css.token.js +3 -0
- package/login/DefaultPage.d.ts +28 -28
- package/login/DefaultPage.js +74 -74
- package/login/KcContext.d.ts +1 -1
- package/login/KcContext.js +1 -1
- package/login/classes/component-reference.class.d.ts +1 -1
- package/login/classes/component-reference.class.js +1 -1
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.d.ts +7 -2
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.js +19 -36
- package/login/components/field-errors/field-errors.component.d.ts +7 -4
- package/login/components/field-errors/field-errors.component.js +23 -35
- package/login/components/group-label/group-label.component.d.ts +8 -3
- package/login/components/group-label/group-label.component.js +29 -41
- package/login/components/input-field-by-type/input-field-by-type.component.d.ts +7 -4
- package/login/components/input-field-by-type/input-field-by-type.component.js +33 -50
- package/login/components/input-tag/input-tag.component.d.ts +9 -4
- package/login/components/input-tag/input-tag.component.js +47 -64
- package/login/components/input-tag-selects/input-tag-selects.component.d.ts +11 -6
- package/login/components/input-tag-selects/input-tag-selects.component.js +41 -56
- package/login/components/logout-other-sessions/logout-other-sessions.component.d.ts +7 -2
- package/login/components/logout-other-sessions/logout-other-sessions.component.js +25 -36
- package/login/components/password-wrapper/password-wrapper.component.d.ts +8 -3
- package/login/components/password-wrapper/password-wrapper.component.js +27 -38
- package/login/components/select-tag/select-tag.component.d.ts +9 -4
- package/login/components/select-tag/select-tag.component.js +32 -47
- package/login/components/textarea-tag/textarea-tag.component.d.ts +7 -4
- package/login/components/textarea-tag/textarea-tag.component.js +28 -42
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.d.ts +11 -5
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.js +45 -57
- package/login/containers/template.component.d.ts +11 -8
- package/login/containers/template.component.js +36 -42
- package/login/directives/kc-class.directive.d.ts +5 -2
- package/login/directives/kc-class.directive.js +35 -43
- package/login/i18n.d.ts +2 -2
- package/login/i18n.js +1 -1
- package/login/pages/code/code.component.d.ts +8 -3
- package/login/pages/code/code.component.js +28 -31
- package/login/pages/delete-account-confirm/delete-account-confirm.component.d.ts +8 -3
- package/login/pages/delete-account-confirm/delete-account-confirm.component.js +28 -31
- package/login/pages/delete-credential/delete-credential.component.d.ts +8 -3
- package/login/pages/delete-credential/delete-credential.component.js +28 -31
- package/login/pages/error/error.component.d.ts +8 -3
- package/login/pages/error/error.component.js +28 -31
- package/login/pages/frontchannel-logout/frontchannel-logout.component.d.ts +9 -4
- package/login/pages/frontchannel-logout/frontchannel-logout.component.js +28 -31
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.d.ts +13 -3
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.js +40 -41
- package/login/pages/info/info.component.d.ts +8 -9
- package/login/pages/info/info.component.js +31 -43
- package/login/pages/login/login.component.d.ts +8 -3
- package/login/pages/login/login.component.js +33 -47
- package/login/pages/login-config-totp/login-config-totp.component.d.ts +8 -3
- package/login/pages/login-config-totp/login-config-totp.component.js +31 -42
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.d.ts +8 -3
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.js +28 -31
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.d.ts +8 -3
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.js +28 -31
- package/login/pages/login-idp-link-email/login-idp-link-email.component.d.ts +8 -3
- package/login/pages/login-idp-link-email/login-idp-link-email.component.js +28 -31
- package/login/pages/login-oauth-grant/login-oauth-grant.component.d.ts +8 -3
- package/login/pages/login-oauth-grant/login-oauth-grant.component.js +29 -33
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.d.ts +8 -3
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.js +28 -31
- package/login/pages/login-otp/login-otp.component.d.ts +8 -3
- package/login/pages/login-otp/login-otp.component.js +30 -33
- package/login/pages/login-page-expired/login-page-expired.component.d.ts +8 -3
- package/login/pages/login-page-expired/login-page-expired.component.js +27 -30
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.d.ts +9 -6
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.js +37 -44
- package/login/pages/login-password/login-password.component.d.ts +8 -3
- package/login/pages/login-password/login-password.component.js +31 -40
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.d.ts +8 -3
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.js +30 -38
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.d.ts +8 -3
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.js +30 -33
- package/login/pages/login-reset-otp/login-reset-otp.component.d.ts +8 -3
- package/login/pages/login-reset-otp/login-reset-otp.component.js +29 -32
- package/login/pages/login-reset-password/login-reset-password.component.d.ts +8 -3
- package/login/pages/login-reset-password/login-reset-password.component.js +30 -33
- package/login/pages/login-update-password/login-update-password.component.d.ts +8 -3
- package/login/pages/login-update-password/login-update-password.component.js +32 -42
- package/login/pages/login-update-profile/login-update-profile.component.d.ts +13 -3
- package/login/pages/login-update-profile/login-update-profile.component.js +39 -39
- package/login/pages/login-username/login-username.component.d.ts +8 -3
- package/login/pages/login-username/login-username.component.js +32 -45
- package/login/pages/login-verify-email/login-verify-email.component.d.ts +8 -3
- package/login/pages/login-verify-email/login-verify-email.component.js +28 -31
- package/login/pages/login-x509-info/login-x509-info.component.d.ts +8 -3
- package/login/pages/login-x509-info/login-x509-info.component.js +28 -31
- package/login/pages/logout-confirm/logout-confirm.component.d.ts +8 -3
- package/login/pages/logout-confirm/logout-confirm.component.js +28 -31
- package/login/pages/register/register.component.d.ts +13 -3
- package/login/pages/register/register.component.js +41 -48
- package/login/pages/saml-post-form/saml-post-form.component.d.ts +9 -4
- package/login/pages/saml-post-form/saml-post-form.component.js +32 -35
- package/login/pages/select-authenticator/select-authenticator.component.d.ts +8 -3
- package/login/pages/select-authenticator/select-authenticator.component.js +29 -39
- package/login/pages/terms/terms.component.d.ts +8 -3
- package/login/pages/terms/terms.component.js +28 -31
- package/login/pages/update-email/update-email.component.d.ts +13 -3
- package/login/pages/update-email/update-email.component.js +40 -41
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.d.ts +9 -6
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.js +37 -50
- package/login/pages/webauthn-error/webauthn-error.component.d.ts +8 -3
- package/login/pages/webauthn-error/webauthn-error.component.js +32 -40
- package/login/pages/webauthn-register/webauthn-register.component.d.ts +9 -6
- package/login/pages/webauthn-register/webauthn-register.component.js +36 -46
- package/login/providers/keycloakify-angular.providers.d.ts +16 -0
- package/login/providers/keycloakify-angular.providers.js +53 -0
- package/login/services/i18n.service.d.ts +6 -0
- package/login/services/i18n.service.js +12 -0
- package/login/services/login-resource-injector.service.d.ts +4 -1
- package/login/services/login-resource-injector.service.js +22 -25
- package/login/services/submit.service.d.ts +9 -0
- package/login/services/submit.service.js +20 -0
- package/login/services/user-profile-form.service.d.ts +16 -12
- package/login/services/user-profile-form.service.js +293 -305
- package/{lib/providers/keycloakify-angular.providers.d.ts → login/tokens/classes.token.d.ts} +14 -37
- package/login/tokens/classes.token.js +3 -0
- package/login/tokens/i18n.token.d.ts +2 -0
- package/login/tokens/i18n.token.js +3 -0
- package/login/tokens/kc-context.token.d.ts +3 -0
- package/login/tokens/kc-context.token.js +3 -0
- package/login/tokens/make-user-confirm-password.token.d.ts +2 -0
- package/login/tokens/make-user-confirm-password.token.js +3 -0
- package/package.json +123 -181
- package/src/account/DefaultPage.ts +51 -0
- package/src/account/KcContext.ts +1 -0
- package/src/account/classes/component-reference.class.ts +6 -0
- package/src/account/containers/template.component.html +125 -0
- package/src/account/containers/template.component.ts +71 -0
- package/src/account/directives/kc-class.directive.ts +150 -0
- package/src/account/i18n.ts +4 -0
- package/src/account/pages/account/account.component.html +165 -0
- package/src/account/pages/account/account.component.ts +34 -0
- package/src/account/pages/applications/applications.component.html +156 -0
- package/src/account/pages/applications/applications.component.ts +32 -0
- package/src/account/pages/federatedIdentity/federatedIdentity.component.html +97 -0
- package/src/account/pages/federatedIdentity/federatedIdentity.component.ts +31 -0
- package/src/account/pages/log/log.component.html +44 -0
- package/src/account/pages/log/log.component.ts +31 -0
- package/src/account/pages/password/password.component.html +131 -0
- package/src/account/pages/password/password.component.ts +110 -0
- package/src/account/pages/sessions/sessions.component.html +63 -0
- package/src/account/pages/sessions/sessions.component.ts +31 -0
- package/src/account/pages/totp/totp.component.html +258 -0
- package/src/account/pages/totp/totp.component.ts +32 -0
- package/src/account/providers/keycloakify-angular.providers.ts +64 -0
- package/src/account/services/i18n.service.ts +7 -0
- package/src/account/services/resource-injector.service.ts +37 -0
- package/src/account/tokens/classes.token.ts +6 -0
- package/src/account/tokens/i18n.token.ts +3 -0
- package/src/account/tokens/kc-context.token.ts +4 -0
- package/src/{login → lib}/directives/attributes.directive.ts +2 -2
- package/src/{login → lib}/pipes/input-type.pipe.ts +4 -4
- package/src/lib/pipes/is-array-with-empty-object.pipe.ts +16 -0
- package/src/lib/pipes/kc-sanitize.pipe.ts +34 -0
- package/src/lib/pipes/to-array.pipe.ts +15 -0
- package/src/lib/pipes/to-number.pipe.ts +13 -0
- package/src/lib/services/resource-injector.service.ts +7 -7
- package/src/lib/tokens/use-default-css.token.ts +3 -0
- package/src/login/DefaultPage.ts +76 -76
- package/src/login/KcContext.ts +1 -1
- package/src/login/classes/component-reference.class.ts +1 -1
- package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html +19 -19
- package/src/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.ts +15 -23
- package/src/login/components/field-errors/field-errors.component.html +10 -10
- package/src/login/components/field-errors/field-errors.component.ts +11 -16
- package/src/login/components/group-label/group-label.component.html +25 -25
- package/src/login/components/group-label/group-label.component.ts +17 -21
- package/src/login/components/input-field-by-type/input-field-by-type.component.html +57 -57
- package/src/login/components/input-field-by-type/input-field-by-type.component.ts +18 -35
- package/src/login/components/input-tag/input-tag.component.html +41 -45
- package/src/login/components/input-tag/input-tag.component.ts +25 -34
- package/src/login/components/input-tag-selects/input-tag-selects.component.html +22 -22
- package/src/login/components/input-tag-selects/input-tag-selects.component.ts +32 -43
- package/src/login/components/logout-other-sessions/logout-other-sessions.component.html +15 -15
- package/src/login/components/logout-other-sessions/logout-other-sessions.component.ts +13 -10
- package/src/login/components/password-wrapper/password-wrapper.component.html +13 -13
- package/src/login/components/password-wrapper/password-wrapper.component.ts +15 -25
- package/src/login/components/select-tag/select-tag.component.html +26 -26
- package/src/login/components/select-tag/select-tag.component.ts +23 -35
- package/src/login/components/textarea-tag/textarea-tag.component.html +13 -15
- package/src/login/components/textarea-tag/textarea-tag.component.ts +16 -25
- package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.html +70 -73
- package/src/login/components/user-profile-form-fields/user-profile-form-fields.component.ts +33 -47
- package/src/login/containers/template.component.html +183 -183
- package/src/login/containers/template.component.ts +26 -42
- package/src/login/directives/kc-class.directive.ts +11 -11
- package/src/login/i18n.ts +2 -2
- package/src/login/pages/code/code.component.html +21 -21
- package/src/login/pages/code/code.component.ts +17 -17
- package/src/login/pages/delete-account-confirm/delete-account-confirm.component.html +44 -42
- package/src/login/pages/delete-account-confirm/delete-account-confirm.component.ts +17 -18
- package/src/login/pages/delete-credential/delete-credential.component.html +29 -29
- package/src/login/pages/delete-credential/delete-credential.component.ts +17 -24
- package/src/login/pages/error/error.component.html +20 -20
- package/src/login/pages/error/error.component.ts +17 -17
- package/src/login/pages/frontchannel-logout/frontchannel-logout.component.html +31 -31
- package/src/login/pages/frontchannel-logout/frontchannel-logout.component.ts +17 -25
- package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +36 -36
- package/src/login/pages/idp-review-user-profile/idp-review-user-profile.component.ts +34 -33
- package/src/login/pages/info/info.component.html +45 -45
- package/src/login/pages/info/info.component.ts +20 -37
- package/src/login/pages/login/login.component.html +194 -194
- package/src/login/pages/login/login.component.ts +22 -43
- package/src/login/pages/login-config-totp/login-config-totp.component.html +189 -179
- package/src/login/pages/login-config-totp/login-config-totp.component.ts +20 -39
- package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.html +35 -35
- package/src/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.ts +17 -24
- package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.html +34 -34
- package/src/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.ts +17 -26
- package/src/login/pages/login-idp-link-email/login-idp-link-email.component.html +32 -30
- package/src/login/pages/login-idp-link-email/login-idp-link-email.component.ts +17 -24
- package/src/login/pages/login-oauth-grant/login-oauth-grant.component.html +83 -81
- package/src/login/pages/login-oauth-grant/login-oauth-grant.component.ts +18 -26
- package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.html +57 -57
- package/src/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.ts +17 -26
- package/src/login/pages/login-otp/login-otp.component.html +96 -96
- package/src/login/pages/login-otp/login-otp.component.ts +19 -25
- package/src/login/pages/login-page-expired/login-page-expired.component.html +31 -31
- package/src/login/pages/login-page-expired/login-page-expired.component.ts +16 -23
- package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.html +183 -181
- package/src/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.ts +25 -32
- package/src/login/pages/login-password/login-password.component.html +82 -82
- package/src/login/pages/login-password/login-password.component.ts +20 -33
- package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.html +142 -142
- package/src/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.ts +19 -34
- package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.html +67 -67
- package/src/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.ts +19 -29
- package/src/login/pages/login-reset-otp/login-reset-otp.component.html +61 -59
- package/src/login/pages/login-reset-otp/login-reset-otp.component.ts +18 -24
- package/src/login/pages/login-reset-password/login-reset-password.component.html +84 -84
- package/src/login/pages/login-reset-password/login-reset-password.component.ts +19 -26
- package/src/login/pages/login-update-password/login-update-password.component.html +107 -107
- package/src/login/pages/login-update-password/login-update-password.component.ts +21 -38
- package/src/login/pages/login-update-profile/login-update-profile.component.html +52 -53
- package/src/login/pages/login-update-profile/login-update-profile.component.ts +31 -32
- package/src/login/pages/login-username/login-username.component.html +146 -146
- package/src/login/pages/login-username/login-username.component.ts +21 -38
- package/src/login/pages/login-verify-email/login-verify-email.component.html +22 -22
- package/src/login/pages/login-verify-email/login-verify-email.component.ts +17 -24
- package/src/login/pages/login-x509-info/login-x509-info.component.html +96 -96
- package/src/login/pages/login-x509-info/login-x509-info.component.ts +17 -23
- package/src/login/pages/logout-confirm/logout-confirm.component.html +51 -51
- package/src/login/pages/logout-confirm/logout-confirm.component.ts +17 -23
- package/src/login/pages/register/register.component.html +113 -113
- package/src/login/pages/register/register.component.ts +33 -39
- package/src/login/pages/saml-post-form/saml-post-form.component.html +47 -48
- package/src/login/pages/saml-post-form/saml-post-form.component.ts +19 -27
- package/src/login/pages/select-authenticator/select-authenticator.component.html +43 -44
- package/src/login/pages/select-authenticator/select-authenticator.component.ts +18 -32
- package/src/login/pages/terms/terms.component.html +32 -32
- package/src/login/pages/terms/terms.component.ts +17 -23
- package/src/login/pages/update-email/update-email.component.html +52 -52
- package/src/login/pages/update-email/update-email.component.ts +33 -33
- package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.html +146 -148
- package/src/login/pages/webauthn-authenticate/webauthn-authenticate.component.ts +26 -50
- package/src/login/pages/webauthn-error/webauthn-error.component.html +53 -53
- package/src/login/pages/webauthn-error/webauthn-error.component.ts +21 -32
- package/src/login/pages/webauthn-register/webauthn-register.component.html +73 -73
- package/src/login/pages/webauthn-register/webauthn-register.component.ts +26 -40
- package/src/login/providers/keycloakify-angular.providers.ts +68 -0
- package/src/login/services/i18n.service.ts +7 -0
- package/src/login/services/login-resource-injector.service.ts +13 -12
- package/src/login/services/submit.service.ts +12 -0
- package/src/login/services/user-profile-form.service.ts +185 -187
- package/src/login/tokens/classes.token.ts +6 -0
- package/src/login/tokens/i18n.token.ts +3 -0
- package/src/login/tokens/kc-context.token.ts +4 -0
- package/src/login/tokens/make-user-confirm-password.token.ts +5 -0
- package/src/tsconfig.json +6 -1
- package/stories/login/pages/login/login.stories.ts +146 -0
- package/lib/i18n.d.ts +0 -4
- package/lib/i18n.js +0 -6
- package/lib/i18n.js.map +0 -1
- package/lib/models/index.d.ts +0 -1
- package/lib/models/index.js +0 -2
- package/lib/models/index.js.map +0 -1
- package/lib/models/script.model.js.map +0 -1
- package/lib/providers/keycloakify-angular.providers.js +0 -58
- package/lib/providers/keycloakify-angular.providers.js.map +0 -1
- package/lib/public-api.d.ts +0 -10
- package/lib/public-api.js +0 -4
- package/lib/public-api.js.map +0 -1
- package/lib/services/i18n.service.d.ts +0 -3
- package/lib/services/i18n.service.js +0 -14
- package/lib/services/i18n.service.js.map +0 -1
- package/lib/services/index.d.ts +0 -2
- package/lib/services/index.js +0 -3
- package/lib/services/index.js.map +0 -1
- package/lib/services/resource-injector.service.js.map +0 -1
- package/login/DefaultPage.js.map +0 -1
- package/login/KcContext.js.map +0 -1
- package/login/classes/component-reference.class.js.map +0 -1
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.html +0 -24
- package/login/components/add-remove-buttons-multi-valued-attribute/add-remove-buttons-multi-valued-attribute.component.js.map +0 -1
- package/login/components/field-errors/field-errors.component.html +0 -15
- package/login/components/field-errors/field-errors.component.js.map +0 -1
- package/login/components/group-label/group-label.component.html +0 -30
- package/login/components/group-label/group-label.component.js.map +0 -1
- package/login/components/index.d.ts +0 -11
- package/login/components/index.js +0 -12
- package/login/components/index.js.map +0 -1
- package/login/components/input-field-by-type/input-field-by-type.component.html +0 -63
- package/login/components/input-field-by-type/input-field-by-type.component.js.map +0 -1
- package/login/components/input-tag/input-tag.component.html +0 -49
- package/login/components/input-tag/input-tag.component.js.map +0 -1
- package/login/components/input-tag-selects/input-tag-selects.component.html +0 -29
- package/login/components/input-tag-selects/input-tag-selects.component.js.map +0 -1
- package/login/components/logout-other-sessions/logout-other-sessions.component.html +0 -19
- package/login/components/logout-other-sessions/logout-other-sessions.component.js.map +0 -1
- package/login/components/password-wrapper/password-wrapper.component.html +0 -15
- package/login/components/password-wrapper/password-wrapper.component.js.map +0 -1
- package/login/components/select-tag/select-tag.component.html +0 -31
- package/login/components/select-tag/select-tag.component.js.map +0 -1
- package/login/components/textarea-tag/textarea-tag.component.html +0 -18
- package/login/components/textarea-tag/textarea-tag.component.js.map +0 -1
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.html +0 -85
- package/login/components/user-profile-form-fields/user-profile-form-fields.component.js.map +0 -1
- package/login/containers/template.component.html +0 -203
- package/login/containers/template.component.js.map +0 -1
- package/login/directives/attributes.directive.d.ts +0 -5
- package/login/directives/attributes.directive.js +0 -34
- package/login/directives/attributes.directive.js.map +0 -1
- package/login/directives/index.d.ts +0 -2
- package/login/directives/index.js +0 -3
- package/login/directives/index.js.map +0 -1
- package/login/directives/kc-class.directive.js.map +0 -1
- package/login/i18n.js.map +0 -1
- package/login/pages/code/code.component.html +0 -26
- package/login/pages/code/code.component.js.map +0 -1
- package/login/pages/delete-account-confirm/delete-account-confirm.component.html +0 -46
- package/login/pages/delete-account-confirm/delete-account-confirm.component.js.map +0 -1
- package/login/pages/delete-credential/delete-credential.component.html +0 -35
- package/login/pages/delete-credential/delete-credential.component.js.map +0 -1
- package/login/pages/error/error.component.html +0 -25
- package/login/pages/error/error.component.js.map +0 -1
- package/login/pages/frontchannel-logout/frontchannel-logout.component.html +0 -35
- package/login/pages/frontchannel-logout/frontchannel-logout.component.js.map +0 -1
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.html +0 -41
- package/login/pages/idp-review-user-profile/idp-review-user-profile.component.js.map +0 -1
- package/login/pages/info/info.component.html +0 -54
- package/login/pages/info/info.component.js.map +0 -1
- package/login/pages/login/login.component.html +0 -212
- package/login/pages/login/login.component.js.map +0 -1
- package/login/pages/login-config-totp/login-config-totp.component.html +0 -190
- package/login/pages/login-config-totp/login-config-totp.component.js.map +0 -1
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.html +0 -41
- package/login/pages/login-idp-link-confirm/login-idp-link-confirm.component.js.map +0 -1
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.html +0 -40
- package/login/pages/login-idp-link-confirm-override/login-idp-link-confirm-override.component.js.map +0 -1
- package/login/pages/login-idp-link-email/login-idp-link-email.component.html +0 -37
- package/login/pages/login-idp-link-email/login-idp-link-email.component.js.map +0 -1
- package/login/pages/login-oauth-grant/login-oauth-grant.component.html +0 -92
- package/login/pages/login-oauth-grant/login-oauth-grant.component.js.map +0 -1
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.html +0 -63
- package/login/pages/login-oauth2-device-verify-user-code/login-oauth2-device-verify-user-code.component.js.map +0 -1
- package/login/pages/login-otp/login-otp.component.html +0 -103
- package/login/pages/login-otp/login-otp.component.js.map +0 -1
- package/login/pages/login-page-expired/login-page-expired.component.html +0 -35
- package/login/pages/login-page-expired/login-page-expired.component.js.map +0 -1
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.html +0 -203
- package/login/pages/login-passkeys-conditional-authenticate/login-passkeys-conditional-authenticate.component.js.map +0 -1
- package/login/pages/login-password/login-password.component.html +0 -90
- package/login/pages/login-password/login-password.component.js.map +0 -1
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.html +0 -155
- package/login/pages/login-recovery-authn-code-config/login-recovery-authn-code-config.component.js.map +0 -1
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.html +0 -76
- package/login/pages/login-recovery-authn-code-input/login-recovery-authn-code-input.component.js.map +0 -1
- package/login/pages/login-reset-otp/login-reset-otp.component.html +0 -65
- package/login/pages/login-reset-otp/login-reset-otp.component.js.map +0 -1
- package/login/pages/login-reset-password/login-reset-password.component.html +0 -95
- package/login/pages/login-reset-password/login-reset-password.component.js.map +0 -1
- package/login/pages/login-update-password/login-update-password.component.html +0 -116
- package/login/pages/login-update-password/login-update-password.component.js.map +0 -1
- package/login/pages/login-update-profile/login-update-profile.component.html +0 -59
- package/login/pages/login-update-profile/login-update-profile.component.js.map +0 -1
- package/login/pages/login-username/login-username.component.html +0 -161
- package/login/pages/login-username/login-username.component.js.map +0 -1
- package/login/pages/login-verify-email/login-verify-email.component.html +0 -27
- package/login/pages/login-verify-email/login-verify-email.component.js.map +0 -1
- package/login/pages/login-x509-info/login-x509-info.component.html +0 -102
- package/login/pages/login-x509-info/login-x509-info.component.js.map +0 -1
- package/login/pages/logout-confirm/logout-confirm.component.html +0 -59
- package/login/pages/logout-confirm/logout-confirm.component.js.map +0 -1
- package/login/pages/register/register.component.html +0 -126
- package/login/pages/register/register.component.js.map +0 -1
- package/login/pages/saml-post-form/saml-post-form.component.html +0 -51
- package/login/pages/saml-post-form/saml-post-form.component.js.map +0 -1
- package/login/pages/select-authenticator/select-authenticator.component.html +0 -49
- package/login/pages/select-authenticator/select-authenticator.component.js.map +0 -1
- package/login/pages/terms/terms.component.html +0 -36
- package/login/pages/terms/terms.component.js.map +0 -1
- package/login/pages/update-email/update-email.component.html +0 -58
- package/login/pages/update-email/update-email.component.js.map +0 -1
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.html +0 -162
- package/login/pages/webauthn-authenticate/webauthn-authenticate.component.js.map +0 -1
- package/login/pages/webauthn-error/webauthn-error.component.html +0 -60
- package/login/pages/webauthn-error/webauthn-error.component.js.map +0 -1
- package/login/pages/webauthn-register/webauthn-register.component.html +0 -82
- package/login/pages/webauthn-register/webauthn-register.component.js.map +0 -1
- package/login/pipes/advanced-msg-str.pipe.d.ts +0 -5
- package/login/pipes/advanced-msg-str.pipe.js +0 -31
- package/login/pipes/advanced-msg-str.pipe.js.map +0 -1
- package/login/pipes/index.d.ts +0 -6
- package/login/pipes/index.js +0 -7
- package/login/pipes/index.js.map +0 -1
- package/login/pipes/input-type.pipe.d.ts +0 -4
- package/login/pipes/input-type.pipe.js +0 -23
- package/login/pipes/input-type.pipe.js.map +0 -1
- package/login/pipes/kc-sanitize.pipe.d.ts +0 -7
- package/login/pipes/kc-sanitize.pipe.js +0 -36
- package/login/pipes/kc-sanitize.pipe.js.map +0 -1
- package/login/pipes/msg-str.pipe.d.ts +0 -6
- package/login/pipes/msg-str.pipe.js +0 -31
- package/login/pipes/msg-str.pipe.js.map +0 -1
- package/login/pipes/to-array.pipe.d.ts +0 -4
- package/login/pipes/to-array.pipe.js +0 -24
- package/login/pipes/to-array.pipe.js.map +0 -1
- package/login/pipes/to-number.pipe.d.ts +0 -4
- package/login/pipes/to-number.pipe.js +0 -23
- package/login/pipes/to-number.pipe.js.map +0 -1
- package/login/services/index.d.ts +0 -2
- package/login/services/index.js +0 -3
- package/login/services/index.js.map +0 -1
- package/login/services/login-resource-injector.service.js.map +0 -1
- package/login/services/user-profile-form.service.js.map +0 -1
- package/src/lib/i18n.ts +0 -9
- package/src/lib/models/index.ts +0 -1
- package/src/lib/providers/keycloakify-angular.providers.ts +0 -92
- package/src/lib/public-api.ts +0 -12
- package/src/lib/services/i18n.service.ts +0 -5
- package/src/lib/services/index.ts +0 -2
- package/src/login/components/index.ts +0 -11
- package/src/login/directives/index.ts +0 -2
- package/src/login/pipes/advanced-msg-str.pipe.ts +0 -13
- package/src/login/pipes/index.ts +0 -6
- package/src/login/pipes/kc-sanitize.pipe.ts +0 -36
- package/src/login/pipes/msg-str.pipe.ts +0 -14
- package/src/login/pipes/to-array.pipe.ts +0 -15
- package/src/login/pipes/to-number.pipe.ts +0 -13
- package/src/login/services/index.ts +0 -2
|
@@ -0,0 +1,63 @@
|
|
|
1
|
+
@let url = kcContext.url;
|
|
2
|
+
@let sessions = kcContext.sessions;
|
|
3
|
+
@let stateChecker = kcContext.stateChecker;
|
|
4
|
+
|
|
5
|
+
<kc-account-template [active]="'sessions'">
|
|
6
|
+
<ng-container content>
|
|
7
|
+
<div [kcClass]="'kcContentWrapperClass'">
|
|
8
|
+
<div class="col-md-10">
|
|
9
|
+
<h2>{{ i18n.msgStr('sessionsHtmlTitle') }}</h2>
|
|
10
|
+
</div>
|
|
11
|
+
</div>
|
|
12
|
+
|
|
13
|
+
<table class="table table-striped table-bordered">
|
|
14
|
+
<thead>
|
|
15
|
+
<tr>
|
|
16
|
+
<th>{{ i18n.msgStr('ip') }}</th>
|
|
17
|
+
<th>{{ i18n.msgStr('started') }}</th>
|
|
18
|
+
<th>{{ i18n.msgStr('lastAccess') }}</th>
|
|
19
|
+
<th>{{ i18n.msgStr('expires') }}</th>
|
|
20
|
+
<th>{{ i18n.msgStr('clients') }}</th>
|
|
21
|
+
</tr>
|
|
22
|
+
</thead>
|
|
23
|
+
|
|
24
|
+
<tbody role="rowgroup">
|
|
25
|
+
@for (session of sessions.sessions; track session) {
|
|
26
|
+
<tr>
|
|
27
|
+
<td>{{ session.ipAddress }}</td>
|
|
28
|
+
<td>{{ session?.started }}</td>
|
|
29
|
+
<td>{{ session?.lastAccess }}</td>
|
|
30
|
+
<td>{{ session?.expires }}</td>
|
|
31
|
+
<td>
|
|
32
|
+
@for (client of session.clients; track client) {
|
|
33
|
+
<div>
|
|
34
|
+
{{ client }}
|
|
35
|
+
<br />
|
|
36
|
+
</div>
|
|
37
|
+
}
|
|
38
|
+
</td>
|
|
39
|
+
</tr>
|
|
40
|
+
}
|
|
41
|
+
</tbody>
|
|
42
|
+
</table>
|
|
43
|
+
|
|
44
|
+
<form
|
|
45
|
+
[action]="url.sessionsUrl"
|
|
46
|
+
method="post"
|
|
47
|
+
>
|
|
48
|
+
<input
|
|
49
|
+
type="hidden"
|
|
50
|
+
id="stateChecker"
|
|
51
|
+
name="stateChecker"
|
|
52
|
+
[value]="stateChecker"
|
|
53
|
+
/>
|
|
54
|
+
<button
|
|
55
|
+
id="logout-all-sessions"
|
|
56
|
+
type="submit"
|
|
57
|
+
[kcClass]="['kcButtonDefaultClass', 'kcButtonClass']"
|
|
58
|
+
>
|
|
59
|
+
{{ i18n.msgStr('doLogOutAllSessions') }}
|
|
60
|
+
</button>
|
|
61
|
+
</form>
|
|
62
|
+
</ng-container>
|
|
63
|
+
</kc-account-template>
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import { NgClass } from '@angular/common';
|
|
2
|
+
import { Component, forwardRef, inject } from '@angular/core';
|
|
3
|
+
import { ComponentReference } from '@keycloakify/angular/account/classes/component-reference.class';
|
|
4
|
+
import { TemplateComponent } from '@keycloakify/angular/account/containers/template.component';
|
|
5
|
+
import { KcClassDirective } from '@keycloakify/angular/account/directives/kc-class.directive';
|
|
6
|
+
import { ACCOUNT_CLASSES } from '@keycloakify/angular/account/tokens/classes.token';
|
|
7
|
+
import { ACCOUNT_I18N } from '@keycloakify/angular/account/tokens/i18n.token';
|
|
8
|
+
import { KC_ACCOUNT_CONTEXT } from '@keycloakify/angular/account/tokens/kc-context.token';
|
|
9
|
+
import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css.token';
|
|
10
|
+
import { type ClassKey } from 'keycloakify/account';
|
|
11
|
+
import { type I18n } from '../../i18n';
|
|
12
|
+
import { type KcContext } from '../../KcContext';
|
|
13
|
+
|
|
14
|
+
@Component({
|
|
15
|
+
standalone: true,
|
|
16
|
+
imports: [KcClassDirective, TemplateComponent, NgClass],
|
|
17
|
+
selector: 'kc-root',
|
|
18
|
+
templateUrl: 'sessions.component.html',
|
|
19
|
+
providers: [
|
|
20
|
+
{
|
|
21
|
+
provide: ComponentReference,
|
|
22
|
+
useExisting: forwardRef(() => SessionsComponent)
|
|
23
|
+
}
|
|
24
|
+
]
|
|
25
|
+
})
|
|
26
|
+
export class SessionsComponent extends ComponentReference {
|
|
27
|
+
i18n = inject<I18n>(ACCOUNT_I18N);
|
|
28
|
+
kcContext = inject<Extract<KcContext, { pageId: 'sessions.ftl' }>>(KC_ACCOUNT_CONTEXT);
|
|
29
|
+
override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
|
|
30
|
+
override classes = inject<Partial<Record<ClassKey, string>>>(ACCOUNT_CLASSES);
|
|
31
|
+
}
|
|
@@ -0,0 +1,258 @@
|
|
|
1
|
+
@let url = kcContext.url;
|
|
2
|
+
@let mode = kcContext.mode;
|
|
3
|
+
@let messagesPerField = kcContext.messagesPerField;
|
|
4
|
+
@let stateChecker = kcContext.stateChecker;
|
|
5
|
+
@let totp = kcContext.totp;
|
|
6
|
+
|
|
7
|
+
<kc-account-template [active]="'totp'">
|
|
8
|
+
<ng-container content>
|
|
9
|
+
<div class="row">
|
|
10
|
+
<div class="col-md-10">
|
|
11
|
+
<h2>{{ i18n.msgStr('authenticatorTitle') }}</h2>
|
|
12
|
+
</div>
|
|
13
|
+
@if (totp.otpCredentials.length) {
|
|
14
|
+
<div class="subtitle col-md-2">
|
|
15
|
+
<span class="required">*</span>
|
|
16
|
+
{{ i18n.msgStr('requiredFields') }}
|
|
17
|
+
</div>
|
|
18
|
+
}
|
|
19
|
+
</div>
|
|
20
|
+
@if (totp.enabled) {
|
|
21
|
+
<table class="table table-bordered table-striped">
|
|
22
|
+
<thead>
|
|
23
|
+
@if (totp.otpCredentials.length > 1) {
|
|
24
|
+
<tr>
|
|
25
|
+
<th [colSpan]="4">{{ i18n.msgStr('configureAuthenticators') }}</th>
|
|
26
|
+
</tr>
|
|
27
|
+
} @else {
|
|
28
|
+
<tr>
|
|
29
|
+
<th [colSpan]="3">{{ i18n.msgStr('configureAuthenticators') }}</th>
|
|
30
|
+
</tr>
|
|
31
|
+
}
|
|
32
|
+
</thead>
|
|
33
|
+
<tbody>
|
|
34
|
+
@for (credential of totp.otpCredentials; track credential; let index = $index) {
|
|
35
|
+
<tr>
|
|
36
|
+
<td class="provider">{{ i18n.msgStr('mobile') }}</td>
|
|
37
|
+
@if (totp.otpCredentials.length > 1) {
|
|
38
|
+
<td class="provider">{{ credential.id }}</td>
|
|
39
|
+
}
|
|
40
|
+
<td class="provider">{{ credential.userLabel || '' }}</td>
|
|
41
|
+
<td class="action">
|
|
42
|
+
<form
|
|
43
|
+
[action]="url.totpUrl"
|
|
44
|
+
method="post"
|
|
45
|
+
class="form-inline"
|
|
46
|
+
>
|
|
47
|
+
<input
|
|
48
|
+
type="hidden"
|
|
49
|
+
id="stateChecker"
|
|
50
|
+
name="stateChecker"
|
|
51
|
+
[value]="stateChecker"
|
|
52
|
+
/>
|
|
53
|
+
<input
|
|
54
|
+
type="hidden"
|
|
55
|
+
id="submitAction"
|
|
56
|
+
name="submitAction"
|
|
57
|
+
value="Delete"
|
|
58
|
+
/>
|
|
59
|
+
<input
|
|
60
|
+
type="hidden"
|
|
61
|
+
id="credentialId"
|
|
62
|
+
name="credentialId"
|
|
63
|
+
[value]="credential.id"
|
|
64
|
+
/>
|
|
65
|
+
<button
|
|
66
|
+
[id]="'remove-mobile-' + index"
|
|
67
|
+
class="btn btn-default"
|
|
68
|
+
>
|
|
69
|
+
<i class="pficon pficon-delete"></i>
|
|
70
|
+
</button>
|
|
71
|
+
</form>
|
|
72
|
+
</td>
|
|
73
|
+
</tr>
|
|
74
|
+
}
|
|
75
|
+
</tbody>
|
|
76
|
+
</table>
|
|
77
|
+
} @else {
|
|
78
|
+
<div>
|
|
79
|
+
<hr />
|
|
80
|
+
<ol id="kc-totp-settings">
|
|
81
|
+
<li>
|
|
82
|
+
<p>{{ i18n.msgStr('totpStep1') }}</p>
|
|
83
|
+
|
|
84
|
+
<ul id="kc-totp-supported-apps">
|
|
85
|
+
@for (app of totp.supportedApplications; track app) {
|
|
86
|
+
<li>{{ i18n.advancedMsgStr(app) }}</li>
|
|
87
|
+
}
|
|
88
|
+
</ul>
|
|
89
|
+
</li>
|
|
90
|
+
@if (mode && mode === 'manual') {
|
|
91
|
+
<li>
|
|
92
|
+
<p>{{ i18n.msgStr('totpManualStep2') }}</p>
|
|
93
|
+
<p>
|
|
94
|
+
<span id="kc-totp-secret-key">{{ totp.totpSecretEncoded }}</span>
|
|
95
|
+
</p>
|
|
96
|
+
<p>
|
|
97
|
+
<a
|
|
98
|
+
[href]="totp.qrUrl"
|
|
99
|
+
id="mode-barcode"
|
|
100
|
+
>
|
|
101
|
+
{{ i18n.msgStr('totpScanBarcode') }}
|
|
102
|
+
</a>
|
|
103
|
+
</p>
|
|
104
|
+
</li>
|
|
105
|
+
<li>
|
|
106
|
+
<p>{{ i18n.msgStr('totpManualStep3') }}</p>
|
|
107
|
+
<ul>
|
|
108
|
+
<li id="kc-totp-type">{{ i18n.msgStr('totpType') }}: {{ i18n.msgStr($any('totp.' + totp.policy.type)) }}</li>
|
|
109
|
+
<li id="kc-totp-algorithm">{{ i18n.msgStr('totpAlgorithm') }}: {{ totp.policy.getAlgorithmKey() }}</li>
|
|
110
|
+
<li id="kc-totp-digits">{{ i18n.msgStr('totpDigits') }}: {{ totp.policy.digits }}</li>
|
|
111
|
+
@if (totp.policy.type === 'totp') {
|
|
112
|
+
<li id="kc-totp-period">{{ i18n.msgStr('totpInterval') }}: {{ totp.policy.period }}</li>
|
|
113
|
+
} @else {
|
|
114
|
+
<li id="kc-totp-counter">{{ i18n.msgStr('totpCounter') }}: {{ totp.policy.initialCounter }}</li>
|
|
115
|
+
}
|
|
116
|
+
</ul>
|
|
117
|
+
</li>
|
|
118
|
+
} @else {
|
|
119
|
+
<li>
|
|
120
|
+
<p>{{ i18n.msgStr('totpStep2') }}</p>
|
|
121
|
+
<p>
|
|
122
|
+
<img
|
|
123
|
+
id="kc-totp-secret-qr-code"
|
|
124
|
+
[src]="'data:image/png;base64, ' + totp.totpSecretQrCode"
|
|
125
|
+
alt="Figure: Barcode"
|
|
126
|
+
/>
|
|
127
|
+
</p>
|
|
128
|
+
<p>
|
|
129
|
+
<a
|
|
130
|
+
[href]="totp.manualUrl"
|
|
131
|
+
id="mode-manual"
|
|
132
|
+
>
|
|
133
|
+
{{ i18n.msgStr('totpUnableToScan') }}
|
|
134
|
+
</a>
|
|
135
|
+
</p>
|
|
136
|
+
</li>
|
|
137
|
+
}
|
|
138
|
+
<li>
|
|
139
|
+
<p>{{ i18n.msgStr('totpStep3') }}</p>
|
|
140
|
+
<p>{{ i18n.msgStr('totpStep3DeviceName') }}</p>
|
|
141
|
+
</li>
|
|
142
|
+
</ol>
|
|
143
|
+
<hr />
|
|
144
|
+
<form
|
|
145
|
+
[action]="url.totpUrl"
|
|
146
|
+
[kcClass]="'kcFormClass'"
|
|
147
|
+
id="kc-totp-settings-form"
|
|
148
|
+
method="post"
|
|
149
|
+
>
|
|
150
|
+
<input
|
|
151
|
+
type="hidden"
|
|
152
|
+
id="stateChecker"
|
|
153
|
+
name="stateChecker"
|
|
154
|
+
[value]="stateChecker"
|
|
155
|
+
/>
|
|
156
|
+
<div [kcClass]="'kcFormGroupClass'">
|
|
157
|
+
<div class="col-sm-2 col-md-2">
|
|
158
|
+
<label
|
|
159
|
+
for="totp"
|
|
160
|
+
class="control-label"
|
|
161
|
+
>
|
|
162
|
+
{{ i18n.msgStr('authenticatorCode') }}
|
|
163
|
+
</label>
|
|
164
|
+
<span class="required">*</span>
|
|
165
|
+
</div>
|
|
166
|
+
<div class="col-sm-10 col-md-10">
|
|
167
|
+
<input
|
|
168
|
+
type="text"
|
|
169
|
+
id="totp"
|
|
170
|
+
name="totp"
|
|
171
|
+
autoComplete="off"
|
|
172
|
+
[kcClass]="'kcInputClass'"
|
|
173
|
+
[attr.aria-invalid]="messagesPerField.existsError('totp')"
|
|
174
|
+
/>
|
|
175
|
+
@if (messagesPerField.existsError('totp')) {
|
|
176
|
+
<span
|
|
177
|
+
id="input-error-otp-code"
|
|
178
|
+
[kcClass]="'kcInputErrorMessageClass'"
|
|
179
|
+
aria-live="polite"
|
|
180
|
+
[innerHTML]="messagesPerField.get('totp') | kcSanitize: 'html'"
|
|
181
|
+
></span>
|
|
182
|
+
}
|
|
183
|
+
</div>
|
|
184
|
+
<input
|
|
185
|
+
type="hidden"
|
|
186
|
+
id="totpSecret"
|
|
187
|
+
name="totpSecret"
|
|
188
|
+
[value]="totp.totpSecret"
|
|
189
|
+
/>
|
|
190
|
+
@if (mode) {
|
|
191
|
+
<input
|
|
192
|
+
type="hidden"
|
|
193
|
+
id="mode"
|
|
194
|
+
[value]="mode"
|
|
195
|
+
/>
|
|
196
|
+
}
|
|
197
|
+
</div>
|
|
198
|
+
|
|
199
|
+
<div [kcClass]="'kcFormGroupClass'">
|
|
200
|
+
<div class="col-sm-2 col-md-2">
|
|
201
|
+
<label
|
|
202
|
+
for="userLabel"
|
|
203
|
+
[kcClass]="'kcLabelClass'"
|
|
204
|
+
>
|
|
205
|
+
{{ i18n.msgStr('totpDeviceName') }}
|
|
206
|
+
</label>
|
|
207
|
+
@if (totp.otpCredentials.length >= 1) {
|
|
208
|
+
<span class="required">*</span>
|
|
209
|
+
}
|
|
210
|
+
</div>
|
|
211
|
+
<div class="col-sm-10 col-md-10">
|
|
212
|
+
<input
|
|
213
|
+
type="text"
|
|
214
|
+
id="userLabel"
|
|
215
|
+
name="userLabel"
|
|
216
|
+
autoComplete="off"
|
|
217
|
+
[kcClass]="'kcInputClass'"
|
|
218
|
+
[attr.aria-invalid]="messagesPerField.existsError('userLabel')"
|
|
219
|
+
/>
|
|
220
|
+
@if (messagesPerField.existsError('userLabel')) {
|
|
221
|
+
<span
|
|
222
|
+
id="input-error-otp-label"
|
|
223
|
+
[kcClass]="'kcInputErrorMessageClass'"
|
|
224
|
+
aria-live="polite"
|
|
225
|
+
[innerHTML]="messagesPerField.get('userLabel') | kcSanitize: 'html'"
|
|
226
|
+
></span>
|
|
227
|
+
}
|
|
228
|
+
</div>
|
|
229
|
+
</div>
|
|
230
|
+
|
|
231
|
+
<div
|
|
232
|
+
id="kc-form-buttons"
|
|
233
|
+
class="text-right"
|
|
234
|
+
[kcClass]="'kcFormGroupClass'"
|
|
235
|
+
>
|
|
236
|
+
<div [kcClass]="'kcInputWrapperClass'">
|
|
237
|
+
<input
|
|
238
|
+
type="submit"
|
|
239
|
+
[kcClass]="['kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonLargeClass']"
|
|
240
|
+
id="saveTOTPBtn"
|
|
241
|
+
[value]="i18n.msgStr('doSave')"
|
|
242
|
+
/>
|
|
243
|
+
<button
|
|
244
|
+
type="submit"
|
|
245
|
+
[kcClass]="['kcButtonClass', 'kcButtonDefaultClass', 'kcButtonLargeClass']"
|
|
246
|
+
id="cancelTOTPBtn"
|
|
247
|
+
name="submitAction"
|
|
248
|
+
value="Cancel"
|
|
249
|
+
>
|
|
250
|
+
{{ i18n.msgStr('doCancel') }}
|
|
251
|
+
</button>
|
|
252
|
+
</div>
|
|
253
|
+
</div>
|
|
254
|
+
</form>
|
|
255
|
+
</div>
|
|
256
|
+
}
|
|
257
|
+
</ng-container>
|
|
258
|
+
</kc-account-template>
|
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
import { NgClass } from '@angular/common';
|
|
2
|
+
import { Component, forwardRef, inject } from '@angular/core';
|
|
3
|
+
import { ComponentReference } from '@keycloakify/angular/account/classes/component-reference.class';
|
|
4
|
+
import { TemplateComponent } from '@keycloakify/angular/account/containers/template.component';
|
|
5
|
+
import { KcClassDirective } from '@keycloakify/angular/account/directives/kc-class.directive';
|
|
6
|
+
import { ACCOUNT_CLASSES } from '@keycloakify/angular/account/tokens/classes.token';
|
|
7
|
+
import { ACCOUNT_I18N } from '@keycloakify/angular/account/tokens/i18n.token';
|
|
8
|
+
import { KC_ACCOUNT_CONTEXT } from '@keycloakify/angular/account/tokens/kc-context.token';
|
|
9
|
+
import { KcSanitizePipe } from '@keycloakify/angular/lib/pipes/kc-sanitize.pipe';
|
|
10
|
+
import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css.token';
|
|
11
|
+
import { type ClassKey } from 'keycloakify/account';
|
|
12
|
+
import { type I18n } from '../../i18n';
|
|
13
|
+
import { type KcContext } from '../../KcContext';
|
|
14
|
+
|
|
15
|
+
@Component({
|
|
16
|
+
standalone: true,
|
|
17
|
+
imports: [KcClassDirective, TemplateComponent, KcSanitizePipe, NgClass],
|
|
18
|
+
selector: 'kc-root',
|
|
19
|
+
templateUrl: 'totp.component.html',
|
|
20
|
+
providers: [
|
|
21
|
+
{
|
|
22
|
+
provide: ComponentReference,
|
|
23
|
+
useExisting: forwardRef(() => TotpComponent)
|
|
24
|
+
}
|
|
25
|
+
]
|
|
26
|
+
})
|
|
27
|
+
export class TotpComponent extends ComponentReference {
|
|
28
|
+
i18n = inject<I18n>(ACCOUNT_I18N);
|
|
29
|
+
kcContext = inject<Extract<KcContext, { pageId: 'totp.ftl' }>>(KC_ACCOUNT_CONTEXT);
|
|
30
|
+
override doUseDefaultCss = inject<boolean>(USE_DEFAULT_CSS);
|
|
31
|
+
override classes = inject<Partial<Record<ClassKey, string>>>(ACCOUNT_CLASSES);
|
|
32
|
+
}
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
import { DOCUMENT } from '@angular/common';
|
|
2
|
+
import { APP_INITIALIZER, LOCALE_ID, makeEnvironmentProviders } from '@angular/core';
|
|
3
|
+
import { I18nService } from '@keycloakify/angular/account/services/i18n.service';
|
|
4
|
+
import { ACCOUNT_CLASSES } from '@keycloakify/angular/account/tokens/classes.token';
|
|
5
|
+
import { ACCOUNT_I18N } from '@keycloakify/angular/account/tokens/i18n.token';
|
|
6
|
+
import { KC_ACCOUNT_CONTEXT } from '@keycloakify/angular/account/tokens/kc-context.token';
|
|
7
|
+
import { USE_DEFAULT_CSS } from '@keycloakify/angular/lib/tokens/use-default-css.token';
|
|
8
|
+
import { type KcContextLike } from 'keycloakify/account/i18n/noJsx';
|
|
9
|
+
import { type ClassKey } from 'keycloakify/account/lib/kcClsx';
|
|
10
|
+
import { type KcContext } from '../KcContext';
|
|
11
|
+
|
|
12
|
+
export type KeycloakifyAngularAccountConfig = {
|
|
13
|
+
doUseDefaultCss?: boolean;
|
|
14
|
+
classes?: { [key in ClassKey]?: string };
|
|
15
|
+
getI18n: (params: { kcContext: KcContextLike }) => {
|
|
16
|
+
i18n: unknown;
|
|
17
|
+
prI18n_currentLanguage: Promise<unknown> | undefined;
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export const provideKeycloakifyAngularAccount = (
|
|
22
|
+
config: KeycloakifyAngularAccountConfig
|
|
23
|
+
) =>
|
|
24
|
+
makeEnvironmentProviders([
|
|
25
|
+
{
|
|
26
|
+
provide: KC_ACCOUNT_CONTEXT,
|
|
27
|
+
// @ts-ignore
|
|
28
|
+
useValue: window.kcContext
|
|
29
|
+
},
|
|
30
|
+
{
|
|
31
|
+
provide: LOCALE_ID,
|
|
32
|
+
useFactory: (document: Document) => {
|
|
33
|
+
return document.documentElement.lang ?? 'en';
|
|
34
|
+
},
|
|
35
|
+
deps: [DOCUMENT]
|
|
36
|
+
},
|
|
37
|
+
{
|
|
38
|
+
provide: APP_INITIALIZER,
|
|
39
|
+
multi: true,
|
|
40
|
+
useFactory: (i18nService: I18nService, kcContext: KcContext) => async () => {
|
|
41
|
+
const getI18n = config.getI18n;
|
|
42
|
+
|
|
43
|
+
const { i18n, prI18n_currentLanguage } = getI18n({
|
|
44
|
+
kcContext
|
|
45
|
+
});
|
|
46
|
+
let i18nPromise = new Promise<typeof i18n>(resolve => resolve(i18n));
|
|
47
|
+
if (prI18n_currentLanguage) {
|
|
48
|
+
i18nPromise = prI18n_currentLanguage;
|
|
49
|
+
}
|
|
50
|
+
return i18nPromise.then(i18n => {
|
|
51
|
+
i18nService.i18n = i18n;
|
|
52
|
+
return true;
|
|
53
|
+
});
|
|
54
|
+
},
|
|
55
|
+
deps: [I18nService, KC_ACCOUNT_CONTEXT]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
provide: ACCOUNT_I18N,
|
|
59
|
+
useFactory: (i18nService: I18nService) => i18nService.i18n,
|
|
60
|
+
deps: [I18nService]
|
|
61
|
+
},
|
|
62
|
+
{ provide: USE_DEFAULT_CSS, useValue: config?.doUseDefaultCss ?? true },
|
|
63
|
+
{ provide: ACCOUNT_CLASSES, useValue: config?.classes ?? {} }
|
|
64
|
+
]);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { inject, Injectable } from '@angular/core';
|
|
2
|
+
import { KC_ACCOUNT_CONTEXT } from '@keycloakify/angular/account/tokens/kc-context.token';
|
|
3
|
+
import { Script } from '@keycloakify/angular/lib/models/script.model';
|
|
4
|
+
import { ResourceInjectorService } from '@keycloakify/angular/lib/services/resource-injector.service';
|
|
5
|
+
import { catchError, forkJoin, of, switchMap } from 'rxjs';
|
|
6
|
+
import { type KcContext } from '../KcContext';
|
|
7
|
+
|
|
8
|
+
@Injectable({
|
|
9
|
+
providedIn: 'root',
|
|
10
|
+
})
|
|
11
|
+
export class AccountResourceInjectorService {
|
|
12
|
+
private kcContext: KcContext = inject<KcContext>(KC_ACCOUNT_CONTEXT);
|
|
13
|
+
private resourceInjectorService: ResourceInjectorService = inject(ResourceInjectorService);
|
|
14
|
+
|
|
15
|
+
injectResource(doUseDefaultCss = true) {
|
|
16
|
+
if (!doUseDefaultCss) {
|
|
17
|
+
return of(true);
|
|
18
|
+
}
|
|
19
|
+
const stylesheets = [
|
|
20
|
+
`${this.kcContext.url.resourcesCommonPath}/node_modules/patternfly/dist/css/patternfly.min.css`,
|
|
21
|
+
`${this.kcContext.url.resourcesCommonPath}/node_modules/patternfly/dist/css/patternfly-additions.min.css`,
|
|
22
|
+
`${this.kcContext.url.resourcesPath}/css/account.css`,
|
|
23
|
+
];
|
|
24
|
+
|
|
25
|
+
return forkJoin(stylesheets.map((url) => this.resourceInjectorService.createLink(url))).pipe(
|
|
26
|
+
switchMap(() => of(true)),
|
|
27
|
+
catchError((error) => {
|
|
28
|
+
console.error('Error loading styles:', error);
|
|
29
|
+
return of(false);
|
|
30
|
+
}),
|
|
31
|
+
);
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
insertAdditionalScripts(scripts: Script[]) {
|
|
35
|
+
scripts.map((script) => this.resourceInjectorService.createScript(script));
|
|
36
|
+
}
|
|
37
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { Directive, effect, ElementRef, inject, input, Renderer2 } from
|
|
1
|
+
import { Directive, effect, ElementRef, inject, input, Renderer2 } from '@angular/core';
|
|
2
2
|
|
|
3
|
-
@Directive({ selector:
|
|
3
|
+
@Directive({ selector: '[kcAttributes]', standalone: true })
|
|
4
4
|
export class AttributesDirective {
|
|
5
5
|
kcAttributes = input<Record<string, string>>();
|
|
6
6
|
readonly #el = inject<ElementRef<HTMLElement>>(ElementRef);
|
|
@@ -1,15 +1,15 @@
|
|
|
1
|
-
import { Pipe, PipeTransform } from
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
2
|
|
|
3
3
|
@Pipe({
|
|
4
|
-
name:
|
|
4
|
+
name: 'inputType',
|
|
5
5
|
standalone: true
|
|
6
6
|
})
|
|
7
7
|
export class InputTypePipe implements PipeTransform {
|
|
8
8
|
transform(inputType?: string): string {
|
|
9
|
-
if (inputType?.startsWith(
|
|
9
|
+
if (inputType?.startsWith('html5-')) {
|
|
10
10
|
return inputType.slice(6);
|
|
11
11
|
}
|
|
12
12
|
|
|
13
|
-
return inputType ??
|
|
13
|
+
return inputType ?? 'text';
|
|
14
14
|
}
|
|
15
15
|
}
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Pipe({
|
|
4
|
+
name: 'isArrayWithEmptyObject',
|
|
5
|
+
standalone: true,
|
|
6
|
+
})
|
|
7
|
+
export class IsArrayWithEmptyObjectPipe implements PipeTransform {
|
|
8
|
+
transform(variable: unknown): boolean {
|
|
9
|
+
return (
|
|
10
|
+
Array.isArray(variable) &&
|
|
11
|
+
variable.length === 1 &&
|
|
12
|
+
typeof variable[0] === 'object' &&
|
|
13
|
+
Object.keys(variable[0]).length === 0
|
|
14
|
+
);
|
|
15
|
+
}
|
|
16
|
+
}
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import { inject, Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
import {
|
|
3
|
+
DomSanitizer,
|
|
4
|
+
SafeHtml,
|
|
5
|
+
SafeResourceUrl,
|
|
6
|
+
SafeScript,
|
|
7
|
+
SafeStyle,
|
|
8
|
+
SafeUrl
|
|
9
|
+
} from '@angular/platform-browser';
|
|
10
|
+
|
|
11
|
+
@Pipe({ name: 'kcSanitize', standalone: true })
|
|
12
|
+
export class KcSanitizePipe implements PipeTransform {
|
|
13
|
+
#sanitizer = inject(DomSanitizer);
|
|
14
|
+
|
|
15
|
+
transform(
|
|
16
|
+
value: string,
|
|
17
|
+
type: 'html' | 'style' | 'script' | 'url' | 'resourceUrl'
|
|
18
|
+
): SafeHtml | SafeStyle | SafeScript | SafeUrl | SafeResourceUrl {
|
|
19
|
+
switch (type) {
|
|
20
|
+
case 'html':
|
|
21
|
+
return this.#sanitizer.bypassSecurityTrustHtml(value);
|
|
22
|
+
case 'style':
|
|
23
|
+
return this.#sanitizer.bypassSecurityTrustStyle(value);
|
|
24
|
+
case 'script':
|
|
25
|
+
return this.#sanitizer.bypassSecurityTrustScript(value);
|
|
26
|
+
case 'url':
|
|
27
|
+
return this.#sanitizer.bypassSecurityTrustUrl(value);
|
|
28
|
+
case 'resourceUrl':
|
|
29
|
+
return this.#sanitizer.bypassSecurityTrustResourceUrl(value);
|
|
30
|
+
default:
|
|
31
|
+
throw new Error(`Invalid safe type specified: ${type}`);
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Pipe({
|
|
4
|
+
name: 'toArray',
|
|
5
|
+
standalone: true,
|
|
6
|
+
})
|
|
7
|
+
export class ToArrayPipe implements PipeTransform {
|
|
8
|
+
transform(value: string | string[], emptyWhenString = false): string[] {
|
|
9
|
+
// if (!value) throw new Error('must pass a value');
|
|
10
|
+
if (value instanceof Array) {
|
|
11
|
+
return value;
|
|
12
|
+
}
|
|
13
|
+
return emptyWhenString ? [] : [value];
|
|
14
|
+
}
|
|
15
|
+
}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { Pipe, PipeTransform } from '@angular/core';
|
|
2
|
+
|
|
3
|
+
@Pipe({
|
|
4
|
+
name: 'toNumber',
|
|
5
|
+
standalone: true,
|
|
6
|
+
})
|
|
7
|
+
export class ToNumberPipe implements PipeTransform {
|
|
8
|
+
transform(value: string | number): number {
|
|
9
|
+
const number = parseInt(`${value}`);
|
|
10
|
+
if (isNaN(number)) throw new Error('number is NaN');
|
|
11
|
+
return number;
|
|
12
|
+
}
|
|
13
|
+
}
|