diff --git a/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources.properties b/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources.properties index 3df0a18a269..28cc676fb68 100644 --- a/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources.properties +++ b/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources.properties @@ -26,6 +26,7 @@ Recover.password=Recover Password email.username=Email address Enter.detail.to.recover.pwd=Enter below details to recover your password Username=Username +Identifier=Identifier Recover.with.mail=Recover with Mail Recover.with.question=Recover with Security Questions Submit=Submit @@ -100,6 +101,7 @@ Need.to.select.all.mandatory.attributes=You need to select all mandatory attribu Ok=Ok Start.signing.up=Start Signing Up Enter.your.username.here=Enter your username here +Enter.your.identifier.here=Enter your identifier here If.you.specify.tenant.domain.you.registered.under.super.tenant=If you do not specify a tenant domain, you will be registered under super tenant Proceed.to.self.register=Proceed to Self Register Confirm.Privacy.Policy=Please confirm that you have read and understood the Privacy Policy diff --git a/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_fr_FR.properties b/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_fr_FR.properties index 0634d32bdec..026da47ac63 100644 --- a/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_fr_FR.properties +++ b/apps/recovery-portal/src/main/resources/org/wso2/carbon/identity/mgt/recovery/endpoint/i18n/Resources_fr_FR.properties @@ -25,6 +25,7 @@ Identity.server=Identity Server Recover.password=Récupérez son mot de passe Enter.detail.to.recover.pwd=Entrer les détails ci-dessous pour récupérer votre mot de passe Username=Nom d'utilisateur +Identifier=Identifiant Recover.with.mail=récupérer avec l'adresse mail Recover.with.question=récupérer avec les questions de sécurité Submit=Soumettre @@ -97,6 +98,7 @@ Need.to.select.all.mandatory.attributes=Vous devez sélectionner tous les attrib Ok=Ok Start.signing.up=Commencer la connexion Enter.your.username.here=Entrer votre nom d'utilisateur ici +Enter.your.identifier.here=Entrez votre identifiant ici If.you.specify.tenant.domain.you.registered.under.super.tenant=Si vous ne spécifiez aucun domaine, vous allez être enregistré en tant que hôte Proceed.to.self.register=Procéder à l'auto-inscription Confirm.Privacy.Policy=Veuillez confirmer que vous avez lu et compris la politique de confidentialité diff --git a/apps/recovery-portal/src/main/webapp/password-recovery-username-request.jsp b/apps/recovery-portal/src/main/webapp/password-recovery-username-request.jsp index 200eddbc73d..410d3e78a22 100644 --- a/apps/recovery-portal/src/main/webapp/password-recovery-username-request.jsp +++ b/apps/recovery-portal/src/main/webapp/password-recovery-username-request.jsp @@ -22,6 +22,8 @@ <%@ page import="org.apache.commons.lang.StringUtils" %> <%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.IdentityManagementEndpointConstants" %> <%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.IdentityManagementEndpointUtil" %> +<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.PreferenceRetrievalClient" %> +<%@ page import="org.wso2.carbon.identity.mgt.endpoint.util.client.PreferenceRetrievalClientException" %> <%@ page import="org.wso2.carbon.identity.core.util.IdentityTenantUtil" %> @@ -35,6 +37,25 @@ if (StringUtils.isBlank(tenantDomain)) { tenantDomain = IdentityManagementEndpointConstants.SUPER_TENANT; } + + Boolean isMultiAttributeLoginEnabledInTenant = false; + try { + PreferenceRetrievalClient preferenceRetrievalClient = new PreferenceRetrievalClient(); + isMultiAttributeLoginEnabledInTenant = preferenceRetrievalClient.checkMultiAttributeLogin(tenantDomain); + } catch (PreferenceRetrievalClientException e) { + request.setAttribute("error", true); + request.setAttribute("errorMsg", IdentityManagementEndpointUtil + .i18n(recoveryResourceBundle, "something.went.wrong.contact.admin")); + IdentityManagementEndpointUtil.addErrorInformation(request, e); + request.getRequestDispatcher("error.jsp").forward(request, response); + } + + String usernameLabel = "Username"; + String enterUsernameHereText = "Enter.your.username.here"; + if (isMultiAttributeLoginEnabledInTenant) { + usernameLabel = "Identifier"; + enterUsernameHereText = "Enter.your.identifier.here"; + } %> @@ -84,11 +105,11 @@ <% } %>

- <%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, "Enter.your.username.here")%> + <%=IdentityManagementEndpointUtil.i18n(recoveryResourceBundle, enterUsernameHereText)%>

<% diff --git a/apps/recovery-portal/src/main/webapp/password-recovery.jsp b/apps/recovery-portal/src/main/webapp/password-recovery.jsp index e4edea30bc0..db94aa40cca 100644 --- a/apps/recovery-portal/src/main/webapp/password-recovery.jsp +++ b/apps/recovery-portal/src/main/webapp/password-recovery.jsp @@ -88,10 +88,12 @@ Boolean isQuestionBasedPasswordRecoveryEnabledByTenant = false; Boolean isNotificationBasedPasswordRecoveryEnabledByTenant = false; + Boolean isMultiAttributeLoginEnabledInTenant = false; try { PreferenceRetrievalClient preferenceRetrievalClient = new PreferenceRetrievalClient(); isQuestionBasedPasswordRecoveryEnabledByTenant = preferenceRetrievalClient.checkQuestionBasedPasswordRecovery(tenantDomain); isNotificationBasedPasswordRecoveryEnabledByTenant = preferenceRetrievalClient.checkNotificationBasedPasswordRecovery(tenantDomain); + isMultiAttributeLoginEnabledInTenant = preferenceRetrievalClient.checkMultiAttributeLogin(tenantDomain); } catch (PreferenceRetrievalClientException e) { request.setAttribute("error", true); request.setAttribute("errorMsg", IdentityManagementEndpointUtil @@ -99,6 +101,11 @@ IdentityManagementEndpointUtil.addErrorInformation(request, e); request.getRequestDispatcher("error.jsp").forward(request, response); } + + String enterUsernameHereText = "Enter.your.username.here"; + if (isMultiAttributeLoginEnabledInTenant) { + enterUsernameHereText = "Enter.your.identifier.here"; + } %> @@ -153,7 +160,7 @@ %>
<% @@ -171,7 +178,7 @@
<%