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

Add display name #177

Merged
merged 1 commit into from
Nov 17, 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.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;
import static org.wso2.carbon.identity.application.authenticator.totp.TOTPAuthenticatorConstants.LogConstants.ActionIDs.PROCESS_AUTHENTICATION_RESPONSE;
Expand Down Expand Up @@ -770,7 +771,7 @@ public Optional<AuthenticatorData> getAuthInitiationData(AuthenticationContext c

List<AuthenticatorParamMetadata> authenticatorParamMetadataList = new ArrayList<>();
AuthenticatorParamMetadata tokenMetadata = new AuthenticatorParamMetadata(
TOTPAuthenticatorConstants.TOKEN, FrameworkConstants.AuthenticatorParamType.STRING,
TOKEN, DISPLAY_TOKEN, FrameworkConstants.AuthenticatorParamType.STRING,
0, Boolean.FALSE, TOTPAuthenticatorConstants.TOTP_AUTHENTICATOR);
authenticatorParamMetadataList.add(tokenMetadata);
authenticatorData.setAuthParams(authenticatorParamMetadataList);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ private TOTPAuthenticatorConstants() {
public static final String ENABLE_TOTP_REQUEST_PAGE = "authenticationendpoint/totp_enroll.do";

public static final String TOKEN = "token";
public static final String DISPLAY_TOKEN = "Token";
public static final String SEND_TOKEN = "sendToken";
public static final String AUTHENTICATION = "authentication";
public static final String BASIC = "basic";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -93,7 +93,9 @@
import static org.powermock.api.mockito.PowerMockito.doReturn;
import static org.powermock.api.mockito.PowerMockito.mock;
import static org.powermock.api.mockito.PowerMockito.mockStatic;
import static org.wso2.carbon.identity.application.authenticator.totp.TOTPAuthenticatorConstants.DISPLAY_TOKEN;
import static org.wso2.carbon.identity.application.authenticator.totp.TOTPAuthenticatorConstants.ENROL_USER_IN_AUTHENTICATIONFLOW;
import static org.wso2.carbon.identity.application.authenticator.totp.TOTPAuthenticatorConstants.TOKEN;

@PrepareForTest({TOTPUtil.class, TOTPTokenGenerator.class, ConfigurationFacade.class, TOTPTokenGenerator.class,
FileBasedConfigurationBuilder.class, IdentityHelperUtil.class, CarbonContext.class,
Expand Down Expand Up @@ -763,7 +765,7 @@ public void testGetAuthInitiationData() {

List<AuthenticatorParamMetadata> authenticatorParamMetadataList = new ArrayList<>();
AuthenticatorParamMetadata tokenMetadata = new AuthenticatorParamMetadata(
TOTPAuthenticatorConstants.TOKEN, FrameworkConstants.AuthenticatorParamType.STRING,
TOKEN, DISPLAY_TOKEN, FrameworkConstants.AuthenticatorParamType.STRING,
0, Boolean.FALSE, TOTPAuthenticatorConstants.TOTP_AUTHENTICATOR);
authenticatorParamMetadataList.add(tokenMetadata);

Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@
<carbon.commons.version>4.8.7</carbon.commons.version>
<carbon.commons.imp.pkg.version>[4.4.0, 5.0.0)</carbon.commons.imp.pkg.version>
<!--Carbon identity version-->
<carbon.identity.framework.version>5.25.503</carbon.identity.framework.version>
<carbon.identity.framework.version>5.25.522</carbon.identity.framework.version>

<org.wso2.carbon.identity.organization.management.core.version>1.0.0
</org.wso2.carbon.identity.organization.management.core.version>
Expand Down
Loading