Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set i18nkey #178

Merged
merged 1 commit into from
Nov 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down Expand Up @@ -765,6 +766,7 @@ public Optional<AuthenticatorData> 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);
Expand Down Expand Up @@ -1339,4 +1341,10 @@ private Optional<String> getUserId(AuthenticatedUser authenticatedUser) {
}
return Optional.empty();
}

@Override
public String getI18nKey() {

return AUTHENTICATOR_TOTP;
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down
Loading