diff --git a/component/authenticator/src/main/java/org/wso2/carbon/identity/application/authenticator/totp/TOTPAuthenticator.java b/component/authenticator/src/main/java/org/wso2/carbon/identity/application/authenticator/totp/TOTPAuthenticator.java index 97e4f2dd6..6b2bc2f9e 100644 --- a/component/authenticator/src/main/java/org/wso2/carbon/identity/application/authenticator/totp/TOTPAuthenticator.java +++ b/component/authenticator/src/main/java/org/wso2/carbon/identity/application/authenticator/totp/TOTPAuthenticator.java @@ -78,6 +78,7 @@ import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; +import static org.wso2.carbon.identity.application.authenticator.totp.TOTPAuthenticatorConstants.AUTHENTICATOR_TOTP; import static org.wso2.carbon.identity.application.authenticator.totp.TOTPAuthenticatorConstants.DISPLAY_TOKEN; import static org.wso2.carbon.identity.application.authenticator.totp.TOTPAuthenticatorConstants.ErrorMessages; import static org.wso2.carbon.identity.application.authenticator.totp.TOTPAuthenticatorConstants.LOGIN_FAIL_MESSAGE; @@ -765,6 +766,7 @@ public Optional getAuthInitiationData(AuthenticationContext c AuthenticatorData authenticatorData = new AuthenticatorData(); authenticatorData.setName(getName()); authenticatorData.setDisplayName(getFriendlyName()); + authenticatorData.setI18nKey(getI18nKey()); String idpName = context.getExternalIdP().getIdPName(); authenticatorData.setIdp(idpName); authenticatorData.setPromptType(FrameworkConstants.AuthenticatorPromptType.USER_PROMPT); @@ -1339,4 +1341,10 @@ private Optional getUserId(AuthenticatedUser authenticatedUser) { } return Optional.empty(); } + + @Override + public String getI18nKey() { + + return AUTHENTICATOR_TOTP; + } } diff --git a/component/authenticator/src/main/java/org/wso2/carbon/identity/application/authenticator/totp/TOTPAuthenticatorConstants.java b/component/authenticator/src/main/java/org/wso2/carbon/identity/application/authenticator/totp/TOTPAuthenticatorConstants.java index 89c5ffa6e..d55669342 100644 --- a/component/authenticator/src/main/java/org/wso2/carbon/identity/application/authenticator/totp/TOTPAuthenticatorConstants.java +++ b/component/authenticator/src/main/java/org/wso2/carbon/identity/application/authenticator/totp/TOTPAuthenticatorConstants.java @@ -36,6 +36,7 @@ private TOTPAuthenticatorConstants() { public static final String USER_PROMPT = "USER_PROMPT"; public static final String AUTHENTICATOR_FRIENDLY_NAME = "TOTP"; public static final String AUTHENTICATOR_NAME = "totp"; + public static final String AUTHENTICATOR_TOTP = "authenticator.totp"; public static final String QR_CODE_CLAIM_URL = "http://wso2.org/claims/identity/qrcodeurl"; public static final String SECRET_KEY_CLAIM_URL = "http://wso2.org/claims/identity/secretkey"; public static final String TOTP_ENABLED_CLAIM_URI = "http://wso2.org/claims/identity/totpEnabled";