Skip to content

Commit

Permalink
Merge pull request #193 from ImalshaG/master
Browse files Browse the repository at this point in the history
Set missing display name property to Auth Initiation Data
  • Loading branch information
ImalshaG authored May 10, 2024
2 parents 51b489f + 63a4f92 commit e1bb7d9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2609,6 +2609,7 @@ public Optional<AuthenticatorData> getAuthInitiationData(AuthenticationContext c

AuthenticatorData authenticatorData = new AuthenticatorData();
authenticatorData.setName(getName());
authenticatorData.setDisplayName(getFriendlyName());
String idpName = null;
AuthenticatedUser authenticatedUser = null;
if (context != null && context.getExternalIdP() != null) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1125,6 +1125,8 @@ public void testGetAuthInitiationData() throws AuthenticationFailedException {
authenticatorParamMetadataList.add(usernameMetadata);

Assert.assertEquals(authenticatorDataObj.getName(), SMSOTPConstants.AUTHENTICATOR_NAME);
Assert.assertEquals(authenticatorDataObj.getDisplayName(), SMSOTPConstants.AUTHENTICATOR_FRIENDLY_NAME,
"Authenticator display name should match.");
Assert.assertEquals(authenticatorDataObj.getAuthParams().size(), authenticatorParamMetadataList.size(),
"Size of lists should be equal.");
Assert.assertEquals(authenticatorDataObj.getPromptType(),
Expand Down

0 comments on commit e1bb7d9

Please sign in to comment.