@andreyyolkin/keycloakify-vue 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/README.md +109 -0
- package/keycloakify-vue/account/DefaultPage.vue +55 -0
- package/keycloakify-vue/account/DefaultPage.vue.d.ts +14 -0
- package/keycloakify-vue/account/KcContext/index.d.ts +1 -0
- package/keycloakify-vue/account/KcContext/index.js +0 -0
- package/keycloakify-vue/account/Template.useInitialize.d.ts +13 -0
- package/keycloakify-vue/account/Template.useInitialize.js +20 -0
- package/keycloakify-vue/account/Template.vue +178 -0
- package/keycloakify-vue/account/Template.vue.d.ts +17 -0
- package/keycloakify-vue/account/TemplateProps.d.ts +9 -0
- package/keycloakify-vue/account/TemplateProps.js +0 -0
- package/keycloakify-vue/account/i18n/i18n.d.ts +11 -0
- package/keycloakify-vue/account/i18n/i18n.js +0 -0
- package/keycloakify-vue/account/i18n/i18nBuilder.d.ts +18 -0
- package/keycloakify-vue/account/i18n/i18nBuilder.js +29 -0
- package/keycloakify-vue/account/i18n/index.d.ts +1 -0
- package/keycloakify-vue/account/i18n/index.js +1 -0
- package/keycloakify-vue/account/i18n/useI18n.d.ts +28 -0
- package/keycloakify-vue/account/i18n/useI18n.js +67 -0
- package/keycloakify-vue/account/index.d.ts +4 -0
- package/keycloakify-vue/account/index.js +8 -0
- package/keycloakify-vue/account/pages/Account.vue +182 -0
- package/keycloakify-vue/account/pages/Account.vue.d.ts +9 -0
- package/keycloakify-vue/account/pages/Applications.vue +192 -0
- package/keycloakify-vue/account/pages/Applications.vue.d.ts +9 -0
- package/keycloakify-vue/account/pages/FederatedIdentity.vue +123 -0
- package/keycloakify-vue/account/pages/FederatedIdentity.vue.d.ts +9 -0
- package/keycloakify-vue/account/pages/Log.vue +64 -0
- package/keycloakify-vue/account/pages/Log.vue.d.ts +9 -0
- package/keycloakify-vue/account/pages/NotImplemented.vue +24 -0
- package/keycloakify-vue/account/pages/NotImplemented.vue.d.ts +6 -0
- package/keycloakify-vue/account/pages/PageProps.d.ts +9 -0
- package/keycloakify-vue/account/pages/PageProps.js +0 -0
- package/keycloakify-vue/account/pages/Password.vue +247 -0
- package/keycloakify-vue/account/pages/Password.vue.d.ts +9 -0
- package/keycloakify-vue/account/pages/Sessions.vue +84 -0
- package/keycloakify-vue/account/pages/Sessions.vue.d.ts +9 -0
- package/keycloakify-vue/account/pages/Totp.vue +308 -0
- package/keycloakify-vue/account/pages/Totp.vue.d.ts +9 -0
- package/keycloakify-vue/bin/index.js +14 -0
- package/keycloakify-vue/bin/initialize-account-theme/boilerplate/KcContext.js +0 -0
- package/keycloakify-vue/bin/initialize-account-theme/boilerplate/KcPage.vue +23 -0
- package/keycloakify-vue/bin/initialize-account-theme/boilerplate/KcPageStory.js +18 -0
- package/keycloakify-vue/bin/initialize-account-theme/boilerplate/KcPageStory.vue +13 -0
- package/keycloakify-vue/bin/initialize-account-theme/boilerplate/i18n.js +5 -0
- package/keycloakify-vue/login/DefaultPage.vue +167 -0
- package/keycloakify-vue/login/DefaultPage.vue.d.ts +20 -0
- package/keycloakify-vue/login/Template.useInitialize.d.ts +18 -0
- package/keycloakify-vue/login/Template.useInitialize.js +49 -0
- package/keycloakify-vue/login/Template.vue +239 -0
- package/keycloakify-vue/login/Template.vue.d.ts +26 -0
- package/keycloakify-vue/login/TemplateProps.d.ts +14 -0
- package/keycloakify-vue/login/TemplateProps.js +0 -0
- package/keycloakify-vue/login/components/AddRemoveButtonsMultiValuedAttribute.vue +59 -0
- package/keycloakify-vue/login/components/AddRemoveButtonsMultiValuedAttribute.vue.d.ts +15 -0
- package/keycloakify-vue/login/components/FieldErrors.vue +35 -0
- package/keycloakify-vue/login/components/FieldErrors.vue.d.ts +14 -0
- package/keycloakify-vue/login/components/GroupLabel.vue +68 -0
- package/keycloakify-vue/login/components/GroupLabel.vue.d.ts +14 -0
- package/keycloakify-vue/login/components/InputFieldByType.vue +94 -0
- package/keycloakify-vue/login/components/InputFieldByType.vue.d.ts +4 -0
- package/keycloakify-vue/login/components/InputFieldByTypeProps.d.ts +12 -0
- package/keycloakify-vue/login/components/InputFieldByTypeProps.js +0 -0
- package/keycloakify-vue/login/components/InputTag.vue +105 -0
- package/keycloakify-vue/login/components/InputTag.vue.d.ts +7 -0
- package/keycloakify-vue/login/components/InputTagSelects.vue +108 -0
- package/keycloakify-vue/login/components/InputTagSelects.vue.d.ts +4 -0
- package/keycloakify-vue/login/components/LogoutOtherSessions.vue +27 -0
- package/keycloakify-vue/login/components/LogoutOtherSessions.vue.d.ts +9 -0
- package/keycloakify-vue/login/components/PasswordWrapper.vue +42 -0
- package/keycloakify-vue/login/components/PasswordWrapper.vue.d.ts +20 -0
- package/keycloakify-vue/login/components/SelectTag.vue +74 -0
- package/keycloakify-vue/login/components/SelectTag.vue.d.ts +4 -0
- package/keycloakify-vue/login/components/TermsAcceptance.vue +59 -0
- package/keycloakify-vue/login/components/TermsAcceptance.vue.d.ts +13 -0
- package/keycloakify-vue/login/components/TextareaTag.vue +47 -0
- package/keycloakify-vue/login/components/TextareaTag.vue.d.ts +4 -0
- package/keycloakify-vue/login/components/UserProfileFormFields.vue +119 -0
- package/keycloakify-vue/login/components/UserProfileFormFields.vue.d.ts +33 -0
- package/keycloakify-vue/login/components/UserProfileFormFieldsProps.d.ts +22 -0
- package/keycloakify-vue/login/components/UserProfileFormFieldsProps.js +0 -0
- package/keycloakify-vue/login/components/inputLabel.d.ts +4 -0
- package/keycloakify-vue/login/components/inputLabel.js +15 -0
- package/keycloakify-vue/login/i18n/i18n.d.ts +11 -0
- package/keycloakify-vue/login/i18n/i18n.js +0 -0
- package/keycloakify-vue/login/i18n/i18nBuilder.d.ts +18 -0
- package/keycloakify-vue/login/i18n/i18nBuilder.js +29 -0
- package/keycloakify-vue/login/i18n/index.d.ts +1 -0
- package/keycloakify-vue/login/i18n/index.js +1 -0
- package/keycloakify-vue/login/i18n/useI18n.d.ts +28 -0
- package/keycloakify-vue/login/i18n/useI18n.js +67 -0
- package/keycloakify-vue/login/index.d.ts +5 -0
- package/keycloakify-vue/login/index.js +10 -0
- package/keycloakify-vue/login/lib/useUserProfileForm.d.ts +53 -0
- package/keycloakify-vue/login/lib/useUserProfileForm.js +50 -0
- package/keycloakify-vue/login/pages/Code.vue +54 -0
- package/keycloakify-vue/login/pages/Code.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/DeleteAccountConfirm.vue +69 -0
- package/keycloakify-vue/login/pages/DeleteAccountConfirm.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/DeleteCredential.vue +56 -0
- package/keycloakify-vue/login/pages/DeleteCredential.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/Error.vue +41 -0
- package/keycloakify-vue/login/pages/Error.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/FrontchannelLogout.vue +67 -0
- package/keycloakify-vue/login/pages/FrontchannelLogout.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/IdpReviewUserProfile.vue +77 -0
- package/keycloakify-vue/login/pages/IdpReviewUserProfile.vue.d.ts +14 -0
- package/keycloakify-vue/login/pages/Info.vue +61 -0
- package/keycloakify-vue/login/pages/Info.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LinkIdpAction.vue +66 -0
- package/keycloakify-vue/login/pages/LinkIdpAction.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/Login.vue +230 -0
- package/keycloakify-vue/login/pages/Login.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginConfigTotp.vue +233 -0
- package/keycloakify-vue/login/pages/LoginConfigTotp.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginIdpLinkConfirm.vue +57 -0
- package/keycloakify-vue/login/pages/LoginIdpLinkConfirm.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginIdpLinkConfirmOverride.vue +56 -0
- package/keycloakify-vue/login/pages/LoginIdpLinkConfirmOverride.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginIdpLinkEmail.vue +52 -0
- package/keycloakify-vue/login/pages/LoginIdpLinkEmail.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginOauth2DeviceVerifyUserCode.vue +82 -0
- package/keycloakify-vue/login/pages/LoginOauth2DeviceVerifyUserCode.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginOauthGrant.vue +131 -0
- package/keycloakify-vue/login/pages/LoginOauthGrant.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginOtp.vue +135 -0
- package/keycloakify-vue/login/pages/LoginOtp.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginPageExpired.vue +44 -0
- package/keycloakify-vue/login/pages/LoginPageExpired.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginPasskeysConditionalAuthenticate.useScript.d.ts +21 -0
- package/keycloakify-vue/login/pages/LoginPasskeysConditionalAuthenticate.useScript.js +74 -0
- package/keycloakify-vue/login/pages/LoginPasskeysConditionalAuthenticate.vue +255 -0
- package/keycloakify-vue/login/pages/LoginPasskeysConditionalAuthenticate.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginPassword.useScript.d.ts +23 -0
- package/keycloakify-vue/login/pages/LoginPassword.useScript.js +64 -0
- package/keycloakify-vue/login/pages/LoginPassword.vue +191 -0
- package/keycloakify-vue/login/pages/LoginPassword.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginRecoveryAuthnCodeConfig.useScript.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginRecoveryAuthnCodeConfig.useScript.js +139 -0
- package/keycloakify-vue/login/pages/LoginRecoveryAuthnCodeConfig.vue +183 -0
- package/keycloakify-vue/login/pages/LoginRecoveryAuthnCodeConfig.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginRecoveryAuthnCodeInput.vue +90 -0
- package/keycloakify-vue/login/pages/LoginRecoveryAuthnCodeInput.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginResetOtp.vue +88 -0
- package/keycloakify-vue/login/pages/LoginResetOtp.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginResetPassword.vue +114 -0
- package/keycloakify-vue/login/pages/LoginResetPassword.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginUpdatePassword.vue +145 -0
- package/keycloakify-vue/login/pages/LoginUpdatePassword.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginUpdateProfile.vue +94 -0
- package/keycloakify-vue/login/pages/LoginUpdateProfile.vue.d.ts +14 -0
- package/keycloakify-vue/login/pages/LoginUsername.useScript.d.ts +23 -0
- package/keycloakify-vue/login/pages/LoginUsername.useScript.js +64 -0
- package/keycloakify-vue/login/pages/LoginUsername.vue +263 -0
- package/keycloakify-vue/login/pages/LoginUsername.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginVerifyEmail.vue +39 -0
- package/keycloakify-vue/login/pages/LoginVerifyEmail.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LoginX509Info.vue +120 -0
- package/keycloakify-vue/login/pages/LoginX509Info.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/LogoutConfirm.vue +73 -0
- package/keycloakify-vue/login/pages/LogoutConfirm.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/NotImplemented.vue +12 -0
- package/keycloakify-vue/login/pages/NotImplemented.vue.d.ts +6 -0
- package/keycloakify-vue/login/pages/PageProps.d.ts +9 -0
- package/keycloakify-vue/login/pages/PageProps.js +0 -0
- package/keycloakify-vue/login/pages/Register.vue +158 -0
- package/keycloakify-vue/login/pages/Register.vue.d.ts +14 -0
- package/keycloakify-vue/login/pages/SamlPostForm.vue +75 -0
- package/keycloakify-vue/login/pages/SamlPostForm.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/SelectAuthenticator.vue +65 -0
- package/keycloakify-vue/login/pages/SelectAuthenticator.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/SelectOrganization.vue +89 -0
- package/keycloakify-vue/login/pages/SelectOrganization.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/Terms.vue +56 -0
- package/keycloakify-vue/login/pages/Terms.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/UpdateEmail.vue +100 -0
- package/keycloakify-vue/login/pages/UpdateEmail.vue.d.ts +14 -0
- package/keycloakify-vue/login/pages/WebauthnAuthenticate.useScript.d.ts +22 -0
- package/keycloakify-vue/login/pages/WebauthnAuthenticate.useScript.js +53 -0
- package/keycloakify-vue/login/pages/WebauthnAuthenticate.vue +186 -0
- package/keycloakify-vue/login/pages/WebauthnAuthenticate.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/WebauthnError.vue +84 -0
- package/keycloakify-vue/login/pages/WebauthnError.vue.d.ts +9 -0
- package/keycloakify-vue/login/pages/WebauthnRegister.useScript.d.ts +28 -0
- package/keycloakify-vue/login/pages/WebauthnRegister.useScript.js +75 -0
- package/keycloakify-vue/login/pages/WebauthnRegister.vue +105 -0
- package/keycloakify-vue/login/pages/WebauthnRegister.vue.d.ts +9 -0
- package/keycloakify-vue/tools/useInsertLinkTags.d.ts +12 -0
- package/keycloakify-vue/tools/useInsertLinkTags.js +47 -0
- package/keycloakify-vue/tools/useInsertScriptTags.d.ts +19 -0
- package/keycloakify-vue/tools/useInsertScriptTags.js +56 -0
- package/keycloakify-vue/tools/useSetClassName.d.ts +4 -0
- package/keycloakify-vue/tools/useSetClassName.js +16 -0
- package/package.json +553 -0
- package/src/account/DefaultPage.vue +55 -0
- package/src/account/KcContext/index.ts +1 -0
- package/src/account/Template.useInitialize.ts +34 -0
- package/src/account/Template.vue +178 -0
- package/src/account/TemplateProps.ts +11 -0
- package/src/account/i18n/i18n.ts +16 -0
- package/src/account/i18n/i18nBuilder.ts +100 -0
- package/src/account/i18n/index.ts +1 -0
- package/src/account/i18n/useI18n.ts +128 -0
- package/src/account/index.ts +4 -0
- package/src/account/pages/Account.vue +182 -0
- package/src/account/pages/Applications.vue +192 -0
- package/src/account/pages/FederatedIdentity.vue +123 -0
- package/src/account/pages/Log.vue +64 -0
- package/src/account/pages/NotImplemented.vue +24 -0
- package/src/account/pages/PageProps.ts +10 -0
- package/src/account/pages/Password.vue +247 -0
- package/src/account/pages/Sessions.vue +84 -0
- package/src/account/pages/Totp.vue +308 -0
- package/src/bin/initialize-account-theme/boilerplate/KcContext.ts +11 -0
- package/src/bin/initialize-account-theme/boilerplate/KcPage.vue +23 -0
- package/src/bin/initialize-account-theme/boilerplate/KcPageStory.ts +22 -0
- package/src/bin/initialize-account-theme/boilerplate/KcPageStory.vue +13 -0
- package/src/bin/initialize-account-theme/boilerplate/i18n.ts +8 -0
- package/src/login/DefaultPage.vue +167 -0
- package/src/login/Template.useInitialize.ts +71 -0
- package/src/login/Template.vue +239 -0
- package/src/login/TemplateProps.ts +17 -0
- package/src/login/components/AddRemoveButtonsMultiValuedAttribute.vue +59 -0
- package/src/login/components/FieldErrors.vue +35 -0
- package/src/login/components/GroupLabel.vue +68 -0
- package/src/login/components/InputFieldByType.vue +94 -0
- package/src/login/components/InputFieldByTypeProps.ts +13 -0
- package/src/login/components/InputTag.vue +105 -0
- package/src/login/components/InputTagSelects.vue +108 -0
- package/src/login/components/LogoutOtherSessions.vue +27 -0
- package/src/login/components/PasswordWrapper.vue +42 -0
- package/src/login/components/SelectTag.vue +74 -0
- package/src/login/components/TermsAcceptance.vue +59 -0
- package/src/login/components/TextareaTag.vue +47 -0
- package/src/login/components/UserProfileFormFields.vue +119 -0
- package/src/login/components/UserProfileFormFieldsProps.ts +22 -0
- package/src/login/components/inputLabel.ts +18 -0
- package/src/login/i18n/i18n.ts +16 -0
- package/src/login/i18n/i18nBuilder.ts +100 -0
- package/src/login/i18n/index.ts +1 -0
- package/src/login/i18n/useI18n.ts +128 -0
- package/src/login/index.ts +5 -0
- package/src/login/lib/useUserProfileForm.ts +121 -0
- package/src/login/pages/Code.vue +54 -0
- package/src/login/pages/DeleteAccountConfirm.vue +69 -0
- package/src/login/pages/DeleteCredential.vue +56 -0
- package/src/login/pages/Error.vue +41 -0
- package/src/login/pages/FrontchannelLogout.vue +67 -0
- package/src/login/pages/IdpReviewUserProfile.vue +77 -0
- package/src/login/pages/Info.vue +61 -0
- package/src/login/pages/LinkIdpAction.vue +66 -0
- package/src/login/pages/Login.vue +230 -0
- package/src/login/pages/LoginConfigTotp.vue +233 -0
- package/src/login/pages/LoginIdpLinkConfirm.vue +57 -0
- package/src/login/pages/LoginIdpLinkConfirmOverride.vue +56 -0
- package/src/login/pages/LoginIdpLinkEmail.vue +52 -0
- package/src/login/pages/LoginOauth2DeviceVerifyUserCode.vue +82 -0
- package/src/login/pages/LoginOauthGrant.vue +131 -0
- package/src/login/pages/LoginOtp.vue +135 -0
- package/src/login/pages/LoginPageExpired.vue +44 -0
- package/src/login/pages/LoginPasskeysConditionalAuthenticate.useScript.ts +96 -0
- package/src/login/pages/LoginPasskeysConditionalAuthenticate.vue +255 -0
- package/src/login/pages/LoginPassword.useScript.ts +88 -0
- package/src/login/pages/LoginPassword.vue +191 -0
- package/src/login/pages/LoginRecoveryAuthnCodeConfig.useScript.ts +152 -0
- package/src/login/pages/LoginRecoveryAuthnCodeConfig.vue +183 -0
- package/src/login/pages/LoginRecoveryAuthnCodeInput.vue +90 -0
- package/src/login/pages/LoginResetOtp.vue +88 -0
- package/src/login/pages/LoginResetPassword.vue +114 -0
- package/src/login/pages/LoginUpdatePassword.vue +145 -0
- package/src/login/pages/LoginUpdateProfile.vue +94 -0
- package/src/login/pages/LoginUsername.useScript.ts +88 -0
- package/src/login/pages/LoginUsername.vue +263 -0
- package/src/login/pages/LoginVerifyEmail.vue +39 -0
- package/src/login/pages/LoginX509Info.vue +120 -0
- package/src/login/pages/LogoutConfirm.vue +73 -0
- package/src/login/pages/NotImplemented.vue +12 -0
- package/src/login/pages/PageProps.ts +10 -0
- package/src/login/pages/Register.vue +158 -0
- package/src/login/pages/SamlPostForm.vue +75 -0
- package/src/login/pages/SelectAuthenticator.vue +65 -0
- package/src/login/pages/SelectOrganization.vue +89 -0
- package/src/login/pages/Terms.vue +56 -0
- package/src/login/pages/UpdateEmail.vue +100 -0
- package/src/login/pages/WebauthnAuthenticate.useScript.ts +75 -0
- package/src/login/pages/WebauthnAuthenticate.vue +186 -0
- package/src/login/pages/WebauthnError.vue +84 -0
- package/src/login/pages/WebauthnRegister.useScript.ts +109 -0
- package/src/login/pages/WebauthnRegister.vue +105 -0
- package/src/tools/useInsertLinkTags.ts +62 -0
- package/src/tools/useInsertScriptTags.ts +75 -0
- package/src/tools/useSetClassName.ts +15 -0
- package/stories/account/KcContext.ts +13 -0
- package/stories/account/KcContextMock.ts +26 -0
- package/stories/account/KcPage.vue +26 -0
- package/stories/account/KcPageStory.vue +13 -0
- package/stories/account/i18n.ts +7 -0
- package/stories/account/pages/Account.stories.ts +22 -0
- package/stories/account/pages/Applications.stories.ts +70 -0
- package/stories/account/pages/FederatedIdentity.stories.ts +64 -0
- package/stories/account/pages/Log.stories.ts +42 -0
- package/stories/account/pages/Password.stories.ts +22 -0
- package/stories/account/pages/Sessions.stories.ts +41 -0
- package/stories/account/pages/Totp.stories.ts +33 -0
- package/stories/kc.gen.ts +17 -0
- package/stories/login/KcContext.ts +13 -0
- package/stories/login/KcContextMock.ts +26 -0
- package/stories/login/KcPage.vue +28 -0
- package/stories/login/KcPageStory.vue +13 -0
- package/stories/login/i18n.ts +7 -0
- package/stories/login/pages/Code.stories.ts +50 -0
- package/stories/login/pages/DeleteAccountConfirm.stories.ts +32 -0
- package/stories/login/pages/DeleteCredential.stories.ts +23 -0
- package/stories/login/pages/Error.stories.ts +53 -0
- package/stories/login/pages/FrontchannelLogout.stories.ts +24 -0
- package/stories/login/pages/IdpReviewUserProfile.stories.ts +56 -0
- package/stories/login/pages/Info.stories.ts +52 -0
- package/stories/login/pages/LinkIdpAction.stories.ts +30 -0
- package/stories/login/pages/Login.stories.ts +76 -0
- package/stories/login/pages/LoginConfigTotp.stories.ts +53 -0
- package/stories/login/pages/LoginIdpLinkConfirm.stories.ts +34 -0
- package/stories/login/pages/LoginIdpLinkConfirmOverride.stories.ts +14 -0
- package/stories/login/pages/LoginIdpLinkEmail.stories.ts +60 -0
- package/stories/login/pages/LoginOauth2DeviceVerifyUserCode.stories.ts +42 -0
- package/stories/login/pages/LoginOauthGrant.stories.ts +95 -0
- package/stories/login/pages/LoginOtp.stories.ts +92 -0
- package/stories/login/pages/LoginPageExpired.stories.ts +29 -0
- package/stories/login/pages/LoginPasskeysConditionalAuthenticate.stories.ts +14 -0
- package/stories/login/pages/LoginPassword.stories.ts +49 -0
- package/stories/login/pages/LoginRecoveryAuthnCodeConfig.stories.ts +28 -0
- package/stories/login/pages/LoginRecoveryAuthnCodeInput.stories.ts +14 -0
- package/stories/login/pages/LoginResetOtp.stories.ts +69 -0
- package/stories/login/pages/LoginResetPassword.stories.ts +48 -0
- package/stories/login/pages/LoginUpdatePassword.stories.ts +52 -0
- package/stories/login/pages/LoginUpdateProfile.stories.ts +29 -0
- package/stories/login/pages/LoginUsername.stories.ts +25 -0
- package/stories/login/pages/LoginVerifyEmail.stories.ts +63 -0
- package/stories/login/pages/LoginX509Info.stories.ts +29 -0
- package/stories/login/pages/LogoutConfirm.stories.ts +35 -0
- package/stories/login/pages/Register.stories.ts +76 -0
- package/stories/login/pages/SamlPostForm.stories.ts +14 -0
- package/stories/login/pages/SelectAuthenticator.stories.ts +89 -0
- package/stories/login/pages/SelectOrganization.stories.ts +63 -0
- package/stories/login/pages/Terms.stories.ts +78 -0
- package/stories/login/pages/UpdateEmail.stories.ts +28 -0
- package/stories/login/pages/WebauthnAuthenticate.stories.ts +147 -0
- package/stories/login/pages/WebauthnError.stories.ts +77 -0
- package/stories/login/pages/WebauthnRegister.stories.ts +54 -0
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { type ClassKey, type TemplateProps } from '../TemplateProps';
|
|
2
|
+
import type { Component } from 'vue';
|
|
3
|
+
|
|
4
|
+
export type PageProps<NarrowedKcContext, I18n> = {
|
|
5
|
+
Template: Component<TemplateProps<NarrowedKcContext, I18n>>;
|
|
6
|
+
kcContext: NarrowedKcContext;
|
|
7
|
+
i18n: I18n;
|
|
8
|
+
doUseDefaultCss: boolean;
|
|
9
|
+
classes?: Partial<Record<ClassKey, string>>;
|
|
10
|
+
};
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { KcContext } from 'keycloakify/login/KcContext';
|
|
3
|
+
import { getKcClsx } from 'keycloakify/login/lib/kcClsx';
|
|
4
|
+
import { clsx } from 'keycloakify/tools/clsx';
|
|
5
|
+
import { onMounted, onUnmounted, ref, useTemplateRef, type Component } from 'vue';
|
|
6
|
+
import TermsAcceptance from '../components/TermsAcceptance.vue';
|
|
7
|
+
import type { UserProfileFormFieldsProps } from '../components/UserProfileFormFieldsProps';
|
|
8
|
+
import type { I18n } from '../i18n/i18n';
|
|
9
|
+
import type { PageProps } from './PageProps';
|
|
10
|
+
|
|
11
|
+
const props = defineProps<
|
|
12
|
+
PageProps<Extract<KcContext, { pageId: 'register.ftl' }>, I18n> & {
|
|
13
|
+
UserProfileFormFields: Component<UserProfileFormFieldsProps>;
|
|
14
|
+
doMakeUserConfirmPassword: boolean;
|
|
15
|
+
}
|
|
16
|
+
>();
|
|
17
|
+
|
|
18
|
+
const { kcClsx } = getKcClsx({
|
|
19
|
+
doUseDefaultCss: props.doUseDefaultCss,
|
|
20
|
+
classes: props.classes,
|
|
21
|
+
});
|
|
22
|
+
|
|
23
|
+
const kcContext = props.kcContext;
|
|
24
|
+
const {
|
|
25
|
+
messageHeader,
|
|
26
|
+
url,
|
|
27
|
+
messagesPerField,
|
|
28
|
+
recaptchaRequired,
|
|
29
|
+
recaptchaVisible,
|
|
30
|
+
recaptchaSiteKey,
|
|
31
|
+
recaptchaAction,
|
|
32
|
+
termsAcceptanceRequired,
|
|
33
|
+
} = kcContext;
|
|
34
|
+
|
|
35
|
+
const isFormSubmittable = ref(false);
|
|
36
|
+
const areTermsAccepted = ref(false);
|
|
37
|
+
|
|
38
|
+
const formRef = useTemplateRef<HTMLFormElement>('formRef');
|
|
39
|
+
|
|
40
|
+
onMounted(() => {
|
|
41
|
+
(window as any)['onSubmitRecaptcha'] = () => {
|
|
42
|
+
formRef.value?.requestSubmit();
|
|
43
|
+
};
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
onUnmounted(() => {
|
|
47
|
+
delete (window as any)['onSubmitRecaptcha'];
|
|
48
|
+
});
|
|
49
|
+
</script>
|
|
50
|
+
|
|
51
|
+
<template>
|
|
52
|
+
<component
|
|
53
|
+
:is="Template"
|
|
54
|
+
:kcContext="kcContext"
|
|
55
|
+
:i18n="props.i18n"
|
|
56
|
+
:doUseDefaultCss="doUseDefaultCss"
|
|
57
|
+
:classes="classes"
|
|
58
|
+
:displayMessage="messagesPerField.exists('global')"
|
|
59
|
+
:displayRequiredFields="true"
|
|
60
|
+
>
|
|
61
|
+
<template #header>
|
|
62
|
+
<component
|
|
63
|
+
v-if="messageHeader !== undefined"
|
|
64
|
+
:is="props.i18n.advancedMsg(messageHeader)"
|
|
65
|
+
/>
|
|
66
|
+
<component
|
|
67
|
+
v-else
|
|
68
|
+
:is="props.i18n.msg('registerTitle')"
|
|
69
|
+
/>
|
|
70
|
+
</template>
|
|
71
|
+
|
|
72
|
+
<form
|
|
73
|
+
id="kc-register-form"
|
|
74
|
+
:class="kcClsx('kcFormClass')"
|
|
75
|
+
:action="url.registrationAction"
|
|
76
|
+
method="post"
|
|
77
|
+
ref="formRef"
|
|
78
|
+
>
|
|
79
|
+
<component
|
|
80
|
+
:is="UserProfileFormFields"
|
|
81
|
+
:kcContext="kcContext"
|
|
82
|
+
:i18n="props.i18n"
|
|
83
|
+
:kcClsx="kcClsx"
|
|
84
|
+
:onIsFormSubmittableValueChange="(value: boolean) => (isFormSubmittable = value)"
|
|
85
|
+
:doMakeUserConfirmPassword="doMakeUserConfirmPassword"
|
|
86
|
+
/>
|
|
87
|
+
|
|
88
|
+
<TermsAcceptance
|
|
89
|
+
v-if="termsAcceptanceRequired"
|
|
90
|
+
:i18n="props.i18n"
|
|
91
|
+
:kcClsx="kcClsx"
|
|
92
|
+
:messagesPerField="messagesPerField"
|
|
93
|
+
:areTermsAccepted="areTermsAccepted"
|
|
94
|
+
:onAreTermsAcceptedValueChange="(value: boolean) => (areTermsAccepted = value)"
|
|
95
|
+
/>
|
|
96
|
+
|
|
97
|
+
<div
|
|
98
|
+
v-if="recaptchaRequired && (recaptchaVisible || recaptchaAction === undefined)"
|
|
99
|
+
class="form-group"
|
|
100
|
+
>
|
|
101
|
+
<div :class="kcClsx('kcInputWrapperClass')">
|
|
102
|
+
<div
|
|
103
|
+
class="g-recaptcha"
|
|
104
|
+
data-size="compact"
|
|
105
|
+
:data-sitekey="recaptchaSiteKey"
|
|
106
|
+
:data-action="recaptchaAction"
|
|
107
|
+
></div>
|
|
108
|
+
</div>
|
|
109
|
+
</div>
|
|
110
|
+
|
|
111
|
+
<div :class="kcClsx('kcFormGroupClass')">
|
|
112
|
+
<div
|
|
113
|
+
id="kc-form-options"
|
|
114
|
+
:class="kcClsx('kcFormOptionsClass')"
|
|
115
|
+
>
|
|
116
|
+
<div :class="kcClsx('kcFormOptionsWrapperClass')">
|
|
117
|
+
<span
|
|
118
|
+
><a :href="url.loginUrl"><component :is="props.i18n.msg('backToLogin')" /></a
|
|
119
|
+
></span>
|
|
120
|
+
</div>
|
|
121
|
+
</div>
|
|
122
|
+
|
|
123
|
+
<div
|
|
124
|
+
v-if="recaptchaRequired && !recaptchaVisible && recaptchaAction !== undefined"
|
|
125
|
+
id="kc-form-buttons"
|
|
126
|
+
:class="kcClsx('kcFormButtonsClass')"
|
|
127
|
+
>
|
|
128
|
+
<button
|
|
129
|
+
:class="
|
|
130
|
+
clsx(
|
|
131
|
+
kcClsx('kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonBlockClass', 'kcButtonLargeClass'),
|
|
132
|
+
'g-recaptcha',
|
|
133
|
+
)
|
|
134
|
+
"
|
|
135
|
+
:data-sitekey="recaptchaSiteKey"
|
|
136
|
+
data-callback="onSubmitRecaptcha"
|
|
137
|
+
:data-action="recaptchaAction"
|
|
138
|
+
type="submit"
|
|
139
|
+
>
|
|
140
|
+
<component :is="props.i18n.msg('doRegister')" />
|
|
141
|
+
</button>
|
|
142
|
+
</div>
|
|
143
|
+
<div
|
|
144
|
+
v-else
|
|
145
|
+
id="kc-form-buttons"
|
|
146
|
+
:class="kcClsx('kcFormButtonsClass')"
|
|
147
|
+
>
|
|
148
|
+
<input
|
|
149
|
+
:disabled="!isFormSubmittable || (termsAcceptanceRequired && !areTermsAccepted)"
|
|
150
|
+
:class="kcClsx('kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonBlockClass', 'kcButtonLargeClass')"
|
|
151
|
+
type="submit"
|
|
152
|
+
:value="props.i18n.msgStr('doRegister')"
|
|
153
|
+
/>
|
|
154
|
+
</div>
|
|
155
|
+
</div>
|
|
156
|
+
</form>
|
|
157
|
+
</component>
|
|
158
|
+
</template>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { KcContext } from 'keycloakify/login/KcContext';
|
|
3
|
+
import { onMounted, useTemplateRef } from 'vue';
|
|
4
|
+
import type { I18n } from '../i18n/i18n';
|
|
5
|
+
import type { PageProps } from './PageProps';
|
|
6
|
+
|
|
7
|
+
const props = defineProps<PageProps<Extract<KcContext, { pageId: 'saml-post-form.ftl' }>, I18n>>();
|
|
8
|
+
|
|
9
|
+
const kcContext = props.kcContext;
|
|
10
|
+
const { samlPost } = kcContext;
|
|
11
|
+
|
|
12
|
+
const formRef = useTemplateRef<HTMLFormElement>('formRef');
|
|
13
|
+
|
|
14
|
+
onMounted(() => {
|
|
15
|
+
if (formRef.value === null) {
|
|
16
|
+
return;
|
|
17
|
+
}
|
|
18
|
+
|
|
19
|
+
// Storybook
|
|
20
|
+
if (samlPost.url === '#') {
|
|
21
|
+
alert('In a real Keycloak the user would be redirected immediately');
|
|
22
|
+
return;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
formRef.value.requestSubmit();
|
|
26
|
+
});
|
|
27
|
+
</script>
|
|
28
|
+
|
|
29
|
+
<template>
|
|
30
|
+
<component
|
|
31
|
+
:is="Template"
|
|
32
|
+
:kcContext="kcContext"
|
|
33
|
+
:i18n="props.i18n"
|
|
34
|
+
:doUseDefaultCss="doUseDefaultCss"
|
|
35
|
+
:classes="classes"
|
|
36
|
+
>
|
|
37
|
+
<template #header>
|
|
38
|
+
<component :is="props.i18n.msg('saml.post-form.title')" />
|
|
39
|
+
</template>
|
|
40
|
+
|
|
41
|
+
<p><component :is="props.i18n.msg('saml.post-form.message')" /></p>
|
|
42
|
+
<form
|
|
43
|
+
name="saml-post-binding"
|
|
44
|
+
method="post"
|
|
45
|
+
:action="samlPost.url"
|
|
46
|
+
ref="formRef"
|
|
47
|
+
>
|
|
48
|
+
<input
|
|
49
|
+
v-if="samlPost.SAMLRequest"
|
|
50
|
+
type="hidden"
|
|
51
|
+
name="SAMLRequest"
|
|
52
|
+
:value="samlPost.SAMLRequest"
|
|
53
|
+
/>
|
|
54
|
+
<input
|
|
55
|
+
v-if="samlPost.SAMLResponse"
|
|
56
|
+
type="hidden"
|
|
57
|
+
name="SAMLResponse"
|
|
58
|
+
:value="samlPost.SAMLResponse"
|
|
59
|
+
/>
|
|
60
|
+
<input
|
|
61
|
+
v-if="samlPost.relayState"
|
|
62
|
+
type="hidden"
|
|
63
|
+
name="RelayState"
|
|
64
|
+
:value="samlPost.relayState"
|
|
65
|
+
/>
|
|
66
|
+
<noscript>
|
|
67
|
+
<p><component :is="props.i18n.msg('saml.post-form.js-disabled')" /></p>
|
|
68
|
+
<input
|
|
69
|
+
type="submit"
|
|
70
|
+
:value="props.i18n.msgStr('doContinue')"
|
|
71
|
+
/>
|
|
72
|
+
</noscript>
|
|
73
|
+
</form>
|
|
74
|
+
</component>
|
|
75
|
+
</template>
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { KcContext } from 'keycloakify/login/KcContext';
|
|
3
|
+
import { getKcClsx } from 'keycloakify/login/lib/kcClsx';
|
|
4
|
+
import type { I18n } from '../i18n/i18n';
|
|
5
|
+
import type { PageProps } from './PageProps';
|
|
6
|
+
|
|
7
|
+
const props = defineProps<PageProps<Extract<KcContext, { pageId: 'select-authenticator.ftl' }>, I18n>>();
|
|
8
|
+
|
|
9
|
+
const { kcClsx } = getKcClsx({
|
|
10
|
+
doUseDefaultCss: props.doUseDefaultCss,
|
|
11
|
+
classes: props.classes,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const kcContext = props.kcContext;
|
|
15
|
+
const { url, auth } = kcContext;
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<component
|
|
20
|
+
:is="Template"
|
|
21
|
+
:kcContext="kcContext"
|
|
22
|
+
:i18n="i18n"
|
|
23
|
+
:doUseDefaultCss="doUseDefaultCss"
|
|
24
|
+
:classes="classes"
|
|
25
|
+
:displayInfo="false"
|
|
26
|
+
>
|
|
27
|
+
<template #header>
|
|
28
|
+
<component :is="i18n.msg('loginChooseAuthenticator')" />
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<form
|
|
32
|
+
id="kc-select-credential-form"
|
|
33
|
+
:class="kcClsx('kcFormClass')"
|
|
34
|
+
:action="url.loginAction"
|
|
35
|
+
method="post"
|
|
36
|
+
>
|
|
37
|
+
<div :class="kcClsx('kcSelectAuthListClass')">
|
|
38
|
+
<button
|
|
39
|
+
v-for="(authenticationSelection, i) in auth.authenticationSelections"
|
|
40
|
+
:key="i"
|
|
41
|
+
:class="kcClsx('kcSelectAuthListItemClass')"
|
|
42
|
+
type="submit"
|
|
43
|
+
name="authenticationExecution"
|
|
44
|
+
:value="authenticationSelection.authExecId"
|
|
45
|
+
>
|
|
46
|
+
<div :class="kcClsx('kcSelectAuthListItemIconClass')">
|
|
47
|
+
<i :class="kcClsx('kcSelectAuthListItemIconPropertyClass', authenticationSelection.iconCssClass)"></i>
|
|
48
|
+
</div>
|
|
49
|
+
<div :class="kcClsx('kcSelectAuthListItemBodyClass')">
|
|
50
|
+
<div :class="kcClsx('kcSelectAuthListItemHeadingClass')">
|
|
51
|
+
<component :is="i18n.advancedMsg(authenticationSelection.displayName)" />
|
|
52
|
+
</div>
|
|
53
|
+
<div :class="kcClsx('kcSelectAuthListItemDescriptionClass')">
|
|
54
|
+
<component :is="i18n.advancedMsg(authenticationSelection.helpText)" />
|
|
55
|
+
</div>
|
|
56
|
+
</div>
|
|
57
|
+
<div :class="kcClsx('kcSelectAuthListItemFillClass')"></div>
|
|
58
|
+
<div :class="kcClsx('kcSelectAuthListItemArrowClass')">
|
|
59
|
+
<i :class="kcClsx('kcSelectAuthListItemArrowIconClass')"></i>
|
|
60
|
+
</div>
|
|
61
|
+
</button>
|
|
62
|
+
</div>
|
|
63
|
+
</form>
|
|
64
|
+
</component>
|
|
65
|
+
</template>
|
|
@@ -0,0 +1,89 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { KcContext } from 'keycloakify/login/KcContext';
|
|
3
|
+
import { getKcClsx } from 'keycloakify/login/lib/kcClsx';
|
|
4
|
+
import { ref, useTemplateRef } from 'vue';
|
|
5
|
+
import type { I18n } from '../i18n/i18n';
|
|
6
|
+
import type { PageProps } from './PageProps';
|
|
7
|
+
|
|
8
|
+
const props = defineProps<PageProps<Extract<KcContext, { pageId: 'select-organization.ftl' }>, I18n>>();
|
|
9
|
+
|
|
10
|
+
const { kcClsx } = getKcClsx({
|
|
11
|
+
doUseDefaultCss: props.doUseDefaultCss,
|
|
12
|
+
classes: props.classes,
|
|
13
|
+
});
|
|
14
|
+
|
|
15
|
+
const kcContext = props.kcContext;
|
|
16
|
+
const { url, user } = kcContext;
|
|
17
|
+
|
|
18
|
+
const isSubmitting = ref(false);
|
|
19
|
+
const formRef = useTemplateRef<HTMLFormElement>('formRef');
|
|
20
|
+
const organizationInputRef = useTemplateRef<HTMLInputElement>('organizationInputRef');
|
|
21
|
+
|
|
22
|
+
const organizations = user.organizations ?? [];
|
|
23
|
+
const shouldDisplayGrid = organizations.length > 3;
|
|
24
|
+
|
|
25
|
+
function onOrganizationClick(organizationAlias: string) {
|
|
26
|
+
return (event: MouseEvent) => {
|
|
27
|
+
event.preventDefault();
|
|
28
|
+
|
|
29
|
+
if (!organizationInputRef.value || !formRef.value) {
|
|
30
|
+
return;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
organizationInputRef.value.value = organizationAlias;
|
|
34
|
+
isSubmitting.value = true;
|
|
35
|
+
|
|
36
|
+
if (typeof formRef.value.requestSubmit === 'function') {
|
|
37
|
+
formRef.value.requestSubmit();
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
formRef.value.submit();
|
|
42
|
+
};
|
|
43
|
+
}
|
|
44
|
+
</script>
|
|
45
|
+
|
|
46
|
+
<template>
|
|
47
|
+
<component
|
|
48
|
+
:is="Template"
|
|
49
|
+
:kcContext="kcContext"
|
|
50
|
+
:i18n="i18n"
|
|
51
|
+
:doUseDefaultCss="doUseDefaultCss"
|
|
52
|
+
:classes="classes"
|
|
53
|
+
>
|
|
54
|
+
<form
|
|
55
|
+
ref="formRef"
|
|
56
|
+
:action="url.loginAction"
|
|
57
|
+
class="form-vertical"
|
|
58
|
+
method="post"
|
|
59
|
+
>
|
|
60
|
+
<div
|
|
61
|
+
id="kc-user-organizations"
|
|
62
|
+
:class="kcClsx('kcFormGroupClass')"
|
|
63
|
+
>
|
|
64
|
+
<h2><component :is="i18n.msg('organization.select')" /></h2>
|
|
65
|
+
<ul :class="kcClsx('kcFormSocialAccountListClass', shouldDisplayGrid && 'kcFormSocialAccountListGridClass')">
|
|
66
|
+
<li
|
|
67
|
+
v-for="{ alias, name } in organizations"
|
|
68
|
+
:key="alias"
|
|
69
|
+
>
|
|
70
|
+
<button
|
|
71
|
+
:id="`organization-${alias}`"
|
|
72
|
+
:class="kcClsx('kcFormSocialAccountListButtonClass', shouldDisplayGrid && 'kcFormSocialAccountGridItem')"
|
|
73
|
+
type="button"
|
|
74
|
+
:disabled="isSubmitting"
|
|
75
|
+
@click="onOrganizationClick(alias)"
|
|
76
|
+
>
|
|
77
|
+
<span :class="kcClsx('kcFormSocialAccountNameClass')">{{ name ?? alias }}</span>
|
|
78
|
+
</button>
|
|
79
|
+
</li>
|
|
80
|
+
</ul>
|
|
81
|
+
</div>
|
|
82
|
+
<input
|
|
83
|
+
ref="organizationInputRef"
|
|
84
|
+
type="hidden"
|
|
85
|
+
name="kc.org"
|
|
86
|
+
/>
|
|
87
|
+
</form>
|
|
88
|
+
</component>
|
|
89
|
+
</template>
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { KcContext } from 'keycloakify/login/KcContext';
|
|
3
|
+
import { getKcClsx } from 'keycloakify/login/lib/kcClsx';
|
|
4
|
+
import type { I18n } from '../i18n/i18n';
|
|
5
|
+
import type { PageProps } from './PageProps';
|
|
6
|
+
|
|
7
|
+
const props = defineProps<PageProps<Extract<KcContext, { pageId: 'terms.ftl' }>, I18n>>();
|
|
8
|
+
|
|
9
|
+
const { kcClsx } = getKcClsx({
|
|
10
|
+
doUseDefaultCss: props.doUseDefaultCss,
|
|
11
|
+
classes: props.classes,
|
|
12
|
+
});
|
|
13
|
+
|
|
14
|
+
const kcContext = props.kcContext;
|
|
15
|
+
const { url } = kcContext;
|
|
16
|
+
</script>
|
|
17
|
+
|
|
18
|
+
<template>
|
|
19
|
+
<component
|
|
20
|
+
:is="Template"
|
|
21
|
+
:kcContext="kcContext"
|
|
22
|
+
:i18n="props.i18n"
|
|
23
|
+
:doUseDefaultCss="doUseDefaultCss"
|
|
24
|
+
:classes="classes"
|
|
25
|
+
:displayMessage="false"
|
|
26
|
+
>
|
|
27
|
+
<template #header>
|
|
28
|
+
<component :is="props.i18n.msg('termsTitle')" />
|
|
29
|
+
</template>
|
|
30
|
+
|
|
31
|
+
<div id="kc-terms-text">
|
|
32
|
+
<component :is="props.i18n.msg('termsText')" />
|
|
33
|
+
</div>
|
|
34
|
+
<form
|
|
35
|
+
class="form-actions"
|
|
36
|
+
:action="url.loginAction"
|
|
37
|
+
method="POST"
|
|
38
|
+
>
|
|
39
|
+
<input
|
|
40
|
+
:class="kcClsx('kcButtonClass', 'kcButtonPrimaryClass', 'kcButtonLargeClass')"
|
|
41
|
+
name="accept"
|
|
42
|
+
id="kc-accept"
|
|
43
|
+
type="submit"
|
|
44
|
+
:value="props.i18n.msgStr('doAccept')"
|
|
45
|
+
/>
|
|
46
|
+
<input
|
|
47
|
+
:class="kcClsx('kcButtonClass', 'kcButtonDefaultClass', 'kcButtonLargeClass')"
|
|
48
|
+
name="cancel"
|
|
49
|
+
id="kc-decline"
|
|
50
|
+
type="submit"
|
|
51
|
+
:value="props.i18n.msgStr('doDecline')"
|
|
52
|
+
/>
|
|
53
|
+
</form>
|
|
54
|
+
<div class="clearfix" />
|
|
55
|
+
</component>
|
|
56
|
+
</template>
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
<script setup lang="ts">
|
|
2
|
+
import type { KcContext } from 'keycloakify/login/KcContext';
|
|
3
|
+
import { getKcClsx } from 'keycloakify/login/lib/kcClsx';
|
|
4
|
+
import { ref, type Component } from 'vue';
|
|
5
|
+
import LogoutOtherSessions from '../components/LogoutOtherSessions.vue';
|
|
6
|
+
import type { UserProfileFormFieldsProps } from '../components/UserProfileFormFieldsProps';
|
|
7
|
+
import type { I18n } from '../i18n/i18n';
|
|
8
|
+
import type { PageProps } from './PageProps';
|
|
9
|
+
|
|
10
|
+
const props = defineProps<
|
|
11
|
+
PageProps<Extract<KcContext, { pageId: 'update-email.ftl' }>, I18n> & {
|
|
12
|
+
UserProfileFormFields: Component<UserProfileFormFieldsProps>;
|
|
13
|
+
doMakeUserConfirmPassword: boolean;
|
|
14
|
+
}
|
|
15
|
+
>();
|
|
16
|
+
|
|
17
|
+
const { kcClsx } = getKcClsx({
|
|
18
|
+
doUseDefaultCss: props.doUseDefaultCss,
|
|
19
|
+
classes: props.classes,
|
|
20
|
+
});
|
|
21
|
+
|
|
22
|
+
const kcContext = props.kcContext;
|
|
23
|
+
const { url, messagesPerField, isAppInitiatedAction } = kcContext;
|
|
24
|
+
|
|
25
|
+
const isFormSubmittable = ref(false);
|
|
26
|
+
</script>
|
|
27
|
+
|
|
28
|
+
<template>
|
|
29
|
+
<component
|
|
30
|
+
:is="Template"
|
|
31
|
+
:kcContext="kcContext"
|
|
32
|
+
:i18n="props.i18n"
|
|
33
|
+
:doUseDefaultCss="doUseDefaultCss"
|
|
34
|
+
:classes="classes"
|
|
35
|
+
:displayMessage="messagesPerField.exists('global')"
|
|
36
|
+
:displayRequiredFields="true"
|
|
37
|
+
>
|
|
38
|
+
<template #header>
|
|
39
|
+
<component :is="props.i18n.msg('updateEmailTitle')" />
|
|
40
|
+
</template>
|
|
41
|
+
|
|
42
|
+
<form
|
|
43
|
+
id="kc-update-email-form"
|
|
44
|
+
:class="kcClsx('kcFormClass')"
|
|
45
|
+
:action="url.loginAction"
|
|
46
|
+
method="post"
|
|
47
|
+
>
|
|
48
|
+
<component
|
|
49
|
+
:is="UserProfileFormFields"
|
|
50
|
+
:kcContext="kcContext"
|
|
51
|
+
:i18n="props.i18n"
|
|
52
|
+
:kcClsx="kcClsx"
|
|
53
|
+
:onIsFormSubmittableValueChange="(value: boolean) => (isFormSubmittable = value)"
|
|
54
|
+
:doMakeUserConfirmPassword="doMakeUserConfirmPassword"
|
|
55
|
+
/>
|
|
56
|
+
|
|
57
|
+
<div :class="kcClsx('kcFormGroupClass')">
|
|
58
|
+
<div
|
|
59
|
+
id="kc-form-options"
|
|
60
|
+
:class="kcClsx('kcFormOptionsClass')"
|
|
61
|
+
>
|
|
62
|
+
<div :class="kcClsx('kcFormOptionsWrapperClass')" />
|
|
63
|
+
</div>
|
|
64
|
+
|
|
65
|
+
<LogoutOtherSessions
|
|
66
|
+
:kcClsx="kcClsx"
|
|
67
|
+
:i18n="props.i18n"
|
|
68
|
+
/>
|
|
69
|
+
|
|
70
|
+
<div
|
|
71
|
+
id="kc-form-buttons"
|
|
72
|
+
:class="kcClsx('kcFormButtonsClass')"
|
|
73
|
+
>
|
|
74
|
+
<input
|
|
75
|
+
:disabled="!isFormSubmittable"
|
|
76
|
+
:class="
|
|
77
|
+
kcClsx(
|
|
78
|
+
'kcButtonClass',
|
|
79
|
+
'kcButtonPrimaryClass',
|
|
80
|
+
!isAppInitiatedAction ? 'kcButtonBlockClass' : undefined,
|
|
81
|
+
'kcButtonLargeClass',
|
|
82
|
+
)
|
|
83
|
+
"
|
|
84
|
+
type="submit"
|
|
85
|
+
:value="props.i18n.msgStr('doSubmit')"
|
|
86
|
+
/>
|
|
87
|
+
<button
|
|
88
|
+
v-if="isAppInitiatedAction"
|
|
89
|
+
:class="kcClsx('kcButtonClass', 'kcButtonDefaultClass', 'kcButtonLargeClass')"
|
|
90
|
+
type="submit"
|
|
91
|
+
name="cancel-aia"
|
|
92
|
+
value="true"
|
|
93
|
+
>
|
|
94
|
+
<component :is="props.i18n.msg('doCancel')" />
|
|
95
|
+
</button>
|
|
96
|
+
</div>
|
|
97
|
+
</div>
|
|
98
|
+
</form>
|
|
99
|
+
</component>
|
|
100
|
+
</template>
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
import { onMounted, watch, type Ref } from 'vue';
|
|
2
|
+
import { useInsertScriptTags } from '../../tools/useInsertScriptTags';
|
|
3
|
+
import { assert } from 'keycloakify/tools/assert';
|
|
4
|
+
import { waitForElementMountedOnDom } from 'keycloakify/tools/waitForElementMountedOnDom';
|
|
5
|
+
import type { KcContext } from 'keycloakify/login/KcContext';
|
|
6
|
+
|
|
7
|
+
type KcContextLike = {
|
|
8
|
+
url: {
|
|
9
|
+
resourcesPath: string;
|
|
10
|
+
};
|
|
11
|
+
isUserIdentified: 'true' | 'false';
|
|
12
|
+
challenge: string;
|
|
13
|
+
userVerification: KcContext.WebauthnAuthenticate['userVerification'];
|
|
14
|
+
rpId: string;
|
|
15
|
+
createTimeout: number | string;
|
|
16
|
+
};
|
|
17
|
+
|
|
18
|
+
assert<keyof KcContextLike extends keyof KcContext.WebauthnAuthenticate ? true : false>();
|
|
19
|
+
assert<KcContext.WebauthnAuthenticate extends KcContextLike ? true : false>();
|
|
20
|
+
|
|
21
|
+
type I18nLike = {
|
|
22
|
+
msgStr: (key: 'webauthn-unsupported-browser-text') => string;
|
|
23
|
+
isFetchingTranslations: boolean;
|
|
24
|
+
};
|
|
25
|
+
|
|
26
|
+
export function useScript(params: { authButtonId: string; kcContext: KcContextLike; i18n: Ref<I18nLike> }) {
|
|
27
|
+
const { authButtonId, kcContext, i18n } = params;
|
|
28
|
+
|
|
29
|
+
const { url, isUserIdentified, challenge, userVerification, rpId, createTimeout } = kcContext;
|
|
30
|
+
|
|
31
|
+
const { insertScriptTags } = useInsertScriptTags({
|
|
32
|
+
componentOrHookName: 'WebauthnAuthenticate',
|
|
33
|
+
scriptTags: [
|
|
34
|
+
{
|
|
35
|
+
type: 'module',
|
|
36
|
+
textContent: () => `
|
|
37
|
+
|
|
38
|
+
import { authenticateByWebAuthn } from "${url.resourcesPath}/js/webauthnAuthenticate.js";
|
|
39
|
+
const authButton = document.getElementById('${authButtonId}');
|
|
40
|
+
authButton.addEventListener("click", function() {
|
|
41
|
+
const input = {
|
|
42
|
+
isUserIdentified : ${isUserIdentified},
|
|
43
|
+
challenge : '${challenge}',
|
|
44
|
+
userVerification : '${userVerification}',
|
|
45
|
+
rpId : '${rpId}',
|
|
46
|
+
createTimeout : ${createTimeout},
|
|
47
|
+
errmsg : ${JSON.stringify(i18n.value.msgStr('webauthn-unsupported-browser-text'))}
|
|
48
|
+
};
|
|
49
|
+
authenticateByWebAuthn(input);
|
|
50
|
+
});
|
|
51
|
+
`,
|
|
52
|
+
},
|
|
53
|
+
],
|
|
54
|
+
});
|
|
55
|
+
|
|
56
|
+
onMounted(() => {
|
|
57
|
+
const stopWatch = watch(
|
|
58
|
+
() => i18n.value.isFetchingTranslations,
|
|
59
|
+
async (isFetching) => {
|
|
60
|
+
if (isFetching) {
|
|
61
|
+
return;
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
stopWatch();
|
|
65
|
+
|
|
66
|
+
await waitForElementMountedOnDom({
|
|
67
|
+
elementId: authButtonId,
|
|
68
|
+
});
|
|
69
|
+
|
|
70
|
+
insertScriptTags();
|
|
71
|
+
},
|
|
72
|
+
{ immediate: true },
|
|
73
|
+
);
|
|
74
|
+
});
|
|
75
|
+
}
|