Skip to content

Commit

Permalink
Revert "Feature/keycloak tabs (#1207)" (#1208)
Browse files Browse the repository at this point in the history
This reverts commit 7e53053.
  • Loading branch information
jasondicker authored Jan 23, 2025
1 parent 7e53053 commit 5f9d327
Show file tree
Hide file tree
Showing 12 changed files with 218 additions and 339 deletions.
Binary file modified src/keycloak/providers/jars/keycloak-phone-provider.jar
Binary file not shown.
Binary file modified src/keycloak/providers/jars/keycloak-phone-provider.resources.jar
Binary file not shown.
Binary file modified src/keycloak/providers/jars/keycloak-sms-provider-dummy.jar
Binary file not shown.
Binary file modified src/keycloak/providers/jars/keycloak-sms-provider-twilio.jar
Binary file not shown.

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ kerberosNotConfigured=Kerberos Not Configured
kerberosNotConfiguredTitle=Kerberos Not Configured
bypassKerberosDetail=Either you are not logged in by Kerberos or your browser is not set up for Kerberos login. Please click continue to login in through other means
kerberosNotSetUp=Kerberos is not set up. You cannot login.
registerTitle=Sign up to Yoma with
registerTitle=Sign up to Yoma
registerSubTitle=
loginAccountTitle=Sign in to Yoma with
loginAccountTitle=Sign in to Yoma
loginTitle=Sign in to {0}
loginSubTitle=Sign in with your details below
loginTitleHtml={0}
Expand Down Expand Up @@ -139,7 +139,6 @@ birthday=Birthdate
zoneinfo=Time zone
gssDelegationCredential=GSS Delegation Credential
logoutOtherSessions=Sign out from other devices
orText=OR

profileScopeConsentText=User profile
emailScopeConsentText=Email address
Expand Down Expand Up @@ -546,6 +545,8 @@ phoneUserNotFound=User does not exist.
codeSent=SMS sent to {0}
duplicatePhoneAllowedCantLogin = duplicate Phone is Allowed, so can''t use login by phone. change --spi-phone-support-default-<$realm>-duplicate-phone-allowed to false

signInWithPhone=Sign in with SMS code
signInWithPassword=Sign in with Password
resetWithPhone=Use Phone to reset your account
resetWithEmail=Use Email to reset your account

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ kerberosNotConfigured=Kerberos no configurado
kerberosNotConfiguredTitle=Kerberos no configurado
bypassKerberosDetail=O bien no estás identificado mediante Kerberos o tu navegador no está configurado para identificarse mediante Kerberos. Por favor haz clic para identificarte por otro medio.
kerberosNotSetUp=Kerberos no está configurado. No puedes identificarte.
registerTitle=Regístrate en Yoma con
registerSubTitle=
loginAccountTitle=Iniciar sesión en Yoma con
registerWithTitle=Regístrate con {0}
registerWithTitleHtml={0}
loginAccountTitle=Iniciar sesión en Yoma
loginTitle=Inicia sesión en {0}
loginTitleHtml={0}
impersonateTitle={0} Personificar Usuario
Expand Down Expand Up @@ -100,7 +100,6 @@ birthday=Fecha de nacimiento
zoneinfo=Zona horaria
gssDelegationCredential=GSS Delegation Credential
logoutOtherSessions=Cerrar otras sesiones
orText=O

profileScopeConsentText=Perfil de usuario
emailScopeConsentText=Dirección de correo electrónico
Expand Down Expand Up @@ -320,6 +319,8 @@ phoneUserNotFound=El usuario no existe.
codeSent=SMS enviado a {0}
duplicatePhoneAllowedCantLogin=Se permite el teléfono duplicado, por lo que no se puede usar el inicio de sesión por teléfono. Cambie --spi-phone-support-default-<$realm>-duplicate-phone-allowed a false

signInWithPhone=Iniciar sesión con código SMS
signInWithPassword=Iniciar sesión por Contraseña
resetWithPhone=Restablecer con Teléfono
resetWithEmail=Restablecer con Email

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,8 @@ kerberosNotConfigured=Kerberos non configuré
kerberosNotConfiguredTitle=Kerberos non configuré
bypassKerberosDetail=Si vous n''êtes pas connecté via Kerberos ou bien que votre navigateur n''est pas configuré pour la connexion via Kerberos. Veuillez cliquer pour vous connecter via un autre moyen.
kerberosNotSetUp=Kerberos n''est pas configuré. Connexion impossible.
registerTitle=Inscrivez-vous à Yoma avec
registerSubTitle=
loginAccountTitle=Connectez-vous à Yoma avec
registerTitle=S''enregistrer
loginAccountTitle=Connectez-vous à Yoma
registerWithTitle=Enregistrement avec {0}
registerWithTitleHtml={0}
loginTitle=Se connecter à {0}
Expand Down Expand Up @@ -127,7 +126,6 @@ birthday=Date de naissance
zoneinfo=Fuseau horaire
gssDelegationCredential=Accréditation de délégation GSS
logoutOtherSessions=Se déconnecter des autres appareils
orText=OU

profileScopeConsentText=Profil utilisateur
emailScopeConsentText=Courriel
Expand Down Expand Up @@ -482,6 +480,8 @@ phoneUserNotFound=L''utilisateur n''existe pas.
codeSent=SMS envoyé à {0}
duplicatePhoneAllowedCantLogin=Le téléphone en double est autorisé, donc la connexion par téléphone n''est pas possible. Changez --spi-phone-support-default-<$realm>-duplicate-phone-allowed à false

signInWithPhone=Se connecter avec un code SMS
signInWithPassword=Connexion par mot de Passe
resetWithPhone=Utiliser le téléphone pour réinitialiser votre compte
resetWithEmail=Utiliser l''email pour réinitialiser votre compte

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ kerberosNotConfigured=Kerberos Não Configurado
kerberosNotConfiguredTitle=Kerberos Não Configurado
bypassKerberosDetail=Você não está logado pelo Kerberos ou seu navegador não está configurado para login Kerberos. Clique em continuar para fazer login por outros meios
kerberosNotSetUp=Kerberos não está configurado. Você não pode fazer login.
registerTitle=Inscreva-se no Yoma com
registerTitle=Cadastre-se no Yoma
registerSubTitle=
loginAccountTitle=Entrar no Yoma com
loginAccountTitle=Entre no Yoma
loginTitle=Entrar no {0}
loginSubTitle=Entre com seus dados abaixo
loginTitleHtml={0}
Expand Down Expand Up @@ -139,7 +139,6 @@ birthday=Data de nascimento
zoneinfo=Fuso horário
gssDelegationCredential=Credencial de Delegação GSS
logoutOtherSessions=Sair de outros dispositivos
orText=OU

profileScopeConsentText=Perfil do usuário
emailScopeConsentText=Endereço de email
Expand Down Expand Up @@ -545,6 +544,8 @@ phoneUserNotFound=Usuário não existe.
codeSent=SMS enviado para {0}
duplicatePhoneAllowedCantLogin=Telefone duplicado é permitido, então não é possível usar login por telefone. Altere --spi-phone-support-default-<$realm>-duplicate-phone-allowed para false

signInWithPhone=Entrar com código SMS
signInWithPassword=Entrar com Senha
resetWithPhone=Usar Telefone para redefinir sua conta
resetWithEmail=Usar Email para redefinir sua conta

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,9 +44,9 @@ kerberosNotConfigured=Kerberos Haijasanidiwa
kerberosNotConfiguredTitle=Kerberos Haijasanidiwa
bypassKerberosDetail=Aidha hujaingia kupitia Kerberos au kivinjari chako hakijasanidiwa kwa ajili ya kuingia kwa Kerberos. Tafadhali bofya endelea kuingia kwa kutumia njia nyingine
kerberosNotSetUp=Kerberos haijawekwa. Huwezi kuingia.
registerTitle=Jiandikishe kwenye Yoma kwa
registerTitle=Jisajili kwenye Yoma
registerSubTitle=
loginAccountTitle=Ingia kwenye Yoma kwa
loginAccountTitle=Ingia kwenye Yoma
loginTitle=Ingia kwenye {0}
loginSubTitle=Ingia kwa kutumia maelezo yako hapo chini
loginTitleHtml={0}
Expand Down Expand Up @@ -139,7 +139,6 @@ birthday=Tarehe ya kuzaliwa
zoneinfo=Majira ya saa
gssDelegationCredential=Hati ya Uwakilishi ya GSS
logoutOtherSessions=Toka kwenye vifaa vingine
orText=AU

profileScopeConsentText=Wasifu wa Mtumiaji
emailScopeConsentText=Anwani ya barua pepe
Expand Down Expand Up @@ -544,6 +543,8 @@ phoneUserNotFound=Mtumiaji hayupo.
codeSent=SMS imetumwa kwa {0}
duplicatePhoneAllowedCantLogin=Nambari ya simu inayorudiwa inaruhusiwa, kwa hivyo huwezi kutumia kuingia kwa simu. badilisha --spi-phone-support-default-<$realm>-duplicate-phone-allowed kuwa uongo

signInWithPhone=Ingia kwa msimbo wa SMS
signInWithPassword=Ingia na Nenosiri
resetWithPhone=Tumia Simu kuweka upya akaunti yako
resetWithEmail=Tumia Barua Pepe kuweka upya akaunti yako

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,144 +17,117 @@
<input type="hidden" id="phoneNumberAsUsername" name="phoneNumberAsUsername" v-model="phoneNumberAsUsername">
<input type="hidden" id="isCodeSent" name="isCodeSent" v-model="isCodeSent">

<!-- PatternFly tabs for email/phone toggle -->
<div class="pf-c-tabs pf-m-fill" id="register-tabs">
<button class="pf-c-tabs__scroll-button" type="button" disabled aria-hidden="true" aria-label="Scroll left">
<i class="fa fa-angle-left" aria-hidden="true"></i>
</button>

<ul class="pf-c-tabs__list">
<li class="pf-c-tabs__item" :class="{ 'pf-m-current': !phoneNumberAsUsername }">
<button class="pf-c-tabs__link" type="button" @click="phoneNumberAsUsername = false" :aria-selected="!phoneNumberAsUsername" aria-controls="emailPanel" id="email-tab-link">
<span class="pf-c-tabs__item-icon">
<i class="fa fa-envelope" aria-hidden="true"></i>
</span>
<span class="pf-c-tabs__item-text">${msg("email")}</span>
</button>
</li>

<li class="pf-c-tabs__item text">
${msg("orText")}
</li>

<li class="pf-c-tabs__item" :class="{ 'pf-m-current': phoneNumberAsUsername }">
<button class="pf-c-tabs__link" type="button" @click="phoneNumberAsUsername = true" :aria-selected="phoneNumberAsUsername" aria-controls="phonePanel" id="phone-tab-link">
<span class="pf-c-tabs__item-icon">
<i class="fa fa-phone" aria-hidden="true"></i>
</span>
<span class="pf-c-tabs__item-text">${msg("phone")}</span>
</button>
</li>
</ul>

<button class="pf-c-tabs__scroll-button" type="button" disabled aria-hidden="true" aria-label="Scroll right">
<i class="fa fa-angle-right" aria-hidden="true"></i>
</button>
</div>
<!-- Email Input -->
<div class="${properties.kcFormGroupClass!}" v-bind:style="{ display: phoneNumberAsUsername ? 'none' : 'block' }">
<label for="email" class="${properties.kcLabelClass!}">${msg("enterEmail")}</label>

<!-- Email tab content -->
<div class="pf-c-tab-content" v-show="!phoneNumberAsUsername" id="emailPanel">
<div class="pf-c-tab-content__body">
<div class="${properties.kcFormGroupClass!}">
<label for="email" class="${properties.kcLabelClass!}">${msg("enterEmail")}</label>
<input type="text" id="email" class="${properties.kcInputClass!}" name="email" placeholder="[email protected]"
autocomplete="email" :aria-invalid="!!messageEmailError"
v-model="email" />

<input type="text" id="email" class="${properties.kcInputClass!}" name="email"
placeholder="[email protected]" autocomplete="email"
:aria-invalid="!!messageEmailError" v-model="email" />
<#-- LABEL: email error -->
<div v-if="messageEmailError" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
{{ messageEmailError }}
</div>

<div v-if="messageEmailError" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
{{ messageEmailError }}
</div>
</div>
<#-- LINK: use phone -->
<div class="form-link" style="margin-top: 0.8rem" v-on:click="phoneNumberAsUsername = true" tabindex="0">
<span class="icon">📲</span>
<span class="text">${msg("phoneNumberAsUsername")}</span>
</div>
</div>

<!-- Phone tab content -->
<div class="pf-c-tab-content" v-show="phoneNumberAsUsername" id="phonePanel">
<div class="pf-c-tab-content__body">
<div class="${properties.kcFormGroupClass!}">
<div v-bind:style="{ display: !isCodeSent && !phoneVerified ? 'block' : 'none' }">
<label for="phoneNumber" class="${properties.kcLabelClass!}">${msg("enterPhoneNumber")}</label>
<!-- Phone Number Input -->
<div class="${properties.kcFormGroupClass!}" v-bind:style="{ display: phoneNumberAsUsername ? 'block' : 'none' }">
<div v-bind:style="{ display: !isCodeSent && !phoneVerified ? 'block' : 'none' }">
<label for="phoneNumber" class="${properties.kcLabelClass!}">${msg("enterPhoneNumber")}</label>

<input id="phoneNumber" class="${properties.kcInputClass!}" name="phoneNumber" type="tel"
aria-invalid="<#if messagesPerField.existsError('phoneNumber')>true</#if>"
autocomplete="mobile tel" v-model="phoneNumber"
@input="resetPhoneVerification" v-intl-tel-input :disabled="phoneVerified" />
</div>
<!-- INPUT: phone number -->
<input id="phoneNumber" class="${properties.kcInputClass!}" name="phoneNumber" type="tel"
aria-invalid="<#if messagesPerField.existsError('phoneNumber')>true</#if>" autocomplete="mobile tel"
v-model="phoneNumber" @input="resetPhoneVerification" v-intl-tel-input :disabled="phoneVerified" />
</div>

<div v-if="messagePhoneNumberError" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
{{ messagePhoneNumberError }}
</div>
<#-- LABEL: phone number error -->
<div v-if="messagePhoneNumberError" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
{{ messagePhoneNumberError }}
</div>

<span v-if="isCodeSent && !phoneVerified && !messagePhoneNumberError" aria-live="polite" style="color: green;">
<span style="margin-right: 5px;">✅</span> {{ messageCodeSent }}
</span>
<#-- LABEL: code send success -->
<span v-if="isCodeSent && !phoneVerified && !messagePhoneNumberError" aria-live="polite" style="color: green;">
<span style="margin-right: 5px;">✅</span> {{ messageCodeSent }}
</span>

<div v-bind:style="{ display: phoneVerified && !messagePhoneNumberError ? 'block' : 'none' }">
<span style="color: green;"><span style="margin-right: 5px;">✅</span> {{ messagePhoneVerified }}</span>
</div>
<#-- LABEL: phone number verified -->
<div v-bind:style="{ display: phoneVerified && !messagePhoneNumberError ? 'block' : 'none' }">
<span style="color: green;"><span style="margin-right: 5px;">✅</span> {{ messagePhoneVerified }}</span>
</div>

<div v-if="isCodeSent || phoneVerified" style="margin-top: 0.8rem">
<div class="form-link" v-on:click="clearAndFocusPhoneNumber" tabindex="0">
<span class="icon">🔃</span>
<span class="text">${msg("changePhoneNumber")}</span>
</div>
</div>
<div style="margin-top: 0.8rem">
<#-- LINK: use email -->
<div v-if="!isCodeSent" class="form-link" v-on:click="phoneNumberAsUsername = false" tabindex="0">
<span class="icon">📩</span>
<span class="text">${msg("emailAsUsername")}</span>
</div>

<#if verifyPhone??>
<!-- Phone verification -->
<div v-bind:style="{ display: !phoneVerified ? 'block' : 'none', marginTop: '2rem' }">
<#-- BUTTON: send code -->
<div v-bind:style="{ display: !isCodeSent ? 'block' : 'none' }">
<input tabindex="0" class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!}"
type="button" v-model="sendButtonText" :disabled='sendButtonText !== initSendButtonText' v-on:click="sendVerificationCode()" />
<#-- LINK: change phone number -->
<div v-if="isCodeSent || phoneVerified" class="form-link" v-on:click="clearAndFocusPhoneNumber" tabindex="0">
<span class="icon">🔃</span>
<span class="text">${msg("changePhoneNumber")}</span>
</div>
</div>
</div>

<#if verifyPhone??>
<div v-bind:style="{ display: phoneNumberAsUsername && !phoneVerified ? 'block' : 'none', marginTop: '2rem' }">
<#-- BUTTON: send code -->
<div v-bind:style="{ display: !isCodeSent ? 'block' : 'none' }">
<input tabindex="0" class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!}"
type="button" v-model="sendButtonText" :disabled='sendButtonText !== initSendButtonText' v-on:click="sendVerificationCode()" />
</div>

<div class="${properties.kcFormGroupClass!}" v-bind:style="{ display: isCodeSent ? 'block' : 'none' }">
<label for="code" class="${properties.kcLabelClass!}">${msg("enterCode")}</label>

<!-- INPUT: verification code -->
<div v-otp-input>
<div id="otp-input">
<input
type="text"
maxlength="1"
pattern="[0-9]*"
inputmode="numeric"
autocomplete="off"
placeholder="_"
v-for="(n, index) in 6"
:key="index"
/>
</div>
<input
type="text"
name="code"
id="code"
autocomplete="one-time-code"
inputmode="numeric"
style="position: absolute; left: -9999px;"
/>
</div>

<div class="${properties.kcFormGroupClass!}" v-bind:style="{ display: isCodeSent ? 'block' : 'none' }">
<label for="code" class="${properties.kcLabelClass!}">${msg("enterCode")}</label>

<!-- INPUT: verification code -->
<div v-otp-input>
<div id="otp-input">
<input
type="text"
maxlength="1"
pattern="[0-9]*"
inputmode="numeric"
autocomplete="off"
placeholder="_"
v-for="(n, index) in 6"
:key="index"
/>
</div>
<input
type="text"
name="code"
id="code"
autocomplete="one-time-code"
inputmode="numeric"
style="position: absolute; left: -9999px;"
/>
</div>
<#if messagesPerField.existsError('code')>
<div id="input-error-code" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
${kcSanitize(messagesPerField.getFirstError('code'))?no_esc}
</div>
</#if>

<#if messagesPerField.existsError('code')>
<div id="input-error-code" class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
${kcSanitize(messagesPerField.getFirstError('code'))?no_esc}
</div>
</#if>

<!-- BUTTON: confirm code (submit) -->
<div style="margin-top: 30px;">
<div id="kc-form-buttons">
<input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg('confirmCode')}" v-on:click="confirmCode" />
</div>
</div>
<!-- BUTTON: confirm code (submit) -->
<div style="margin-top: 30px;">
<div id="kc-form-buttons">
<input class="${properties.kcButtonClass!} ${properties.kcButtonPrimaryClass!} ${properties.kcButtonBlockClass!} ${properties.kcButtonLargeClass!}" type="submit" value="${msg('confirmCode')}" v-on:click="confirmCode" />
</div>
</div>
</#if>
</div>
</div>
</div>
</#if>

<div v-bind:style="{ display: !phoneNumberAsUsername || (phoneNumberAsUsername && phoneVerified) ? 'block' : 'none'}">

Expand Down Expand Up @@ -259,11 +232,11 @@
</div>
</#if>

<#--<div v-if="isSubmitAttempted && !isFormValid" class="centered-div">
<#-- <div v-if="isSubmitAttempted && !isFormValid" class="centered-div">
<span class="${properties.kcInputErrorMessageClass!}" aria-live="polite">
${msg("invalidForm")}
</span>
</div>-->
</div> -->

<!-- Submit Button -->
<div id="kc-form-buttons">
Expand Down
Loading

0 comments on commit 5f9d327

Please sign in to comment.