Skip to content

Commit

Permalink
Add display name
Browse files Browse the repository at this point in the history
  • Loading branch information
Hasanthi Dissanayake committed Nov 17, 2023
1 parent 67a64d7 commit 6bf5e93
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 3 deletions.
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

0 comments on commit 6bf5e93

Please sign in to comment.