Skip to content

Commit

Permalink
Improve authenticator mgt to store image and description.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thisara-Welmilla committed Jan 19, 2025
1 parent 45dfd44 commit 67dbed1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -86,10 +86,10 @@ public class ApplicationAuthenticatorServiceTest {
private static EndpointConfig endpointConfig;
private static EndpointConfig endpointConfigToBeUpdated;

private static final String AUTHENTICATOR1_NAME = "custom_auth1";
private static final String AUTHENTICATOR2_NAME = "custom_auth2";
private static final String AUTHENTICATOR_CONFIG_FOR_EXCEPTION_NAME = "custom_exception_auth";
private static final String NON_EXIST_AUTHENTICATOR_NAME = "custom_non_exist_auth";
private static final String AUTHENTICATOR1_NAME = "custom-auth1";
private static final String AUTHENTICATOR2_NAME = "custom-auth2";
private static final String AUTHENTICATOR_CONFIG_FOR_EXCEPTION_NAME = "custom-exception_auth";
private static final String NON_EXIST_AUTHENTICATOR_NAME = "custom-non_exist_auth";
private static final String SYSTEM_AUTHENTICATOR_NAME = "system_auth";

@BeforeClass
Expand Down Expand Up @@ -173,7 +173,7 @@ public void testCreateUserDefinedLocalAuthenticatorWithExistingAuthenticator(
public void testCreateUserDefinedLocalAuthenticatorWithBlankDisplayName() throws AuthenticatorMgtException {

UserDefinedLocalAuthenticatorConfig config = createUserDefinedAuthenticatorConfig(
"custom_withBlankDisplayName", AuthenticationType.IDENTIFICATION);
"custom-withBlankDisplayName", AuthenticationType.IDENTIFICATION);
config.setDisplayName("");
ApplicationCommonServiceDataHolder.getInstance().getApplicationAuthenticatorService()
.addUserDefinedLocalAuthenticator(config, tenantDomain);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ public class AuthenticatorManagementDAOImplTest {
private UserDefinedLocalAuthenticatorConfig authenticatorForUpdate;
private UserDefinedLocalAuthenticatorConfig authenticatorForUpdateForException;

private static final String AUTHENTICATOR1_NAME = "custom_auth1";
private static final String AUTHENTICATOR2_NAME = "custom_auth2";
private static final String AUTHENTICATOR1_NAME = "custom-auth1";
private static final String AUTHENTICATOR2_NAME = "custom-auth2";
private static final String AUTHENTICATOR_CONFIG_FOR_EXCEPTION_NAME = "exception_auth";
private static final String NON_EXIST_AUTHENTICATOR_NAME = "non_exist_auth";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1408,7 +1408,7 @@ public void update(HttpServletRequest request) {
if (!ArrayUtils.isEmpty(properties)) {
for (Property prop : properties) {
String propVal = request.getParameter(
"custom_auth_prop_name_" + type + "_" + prop.getName());
"custom-auth_prop_name_" + type + "_" + prop.getName());
prop.setValue(propVal);
}
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ public class IdPManagementConstants {
= "Recovery.Notification.Password.smsOtp.Enable";

// User defined federated authenticator related constants.
public static final String USER_DEFINED_AUTHENTICATOR_NAME_REGEX = "^custom_[a-zA-Z0-9-_]{3,}$";
public static final String USER_DEFINED_AUTHENTICATOR_NAME_REGEX = "^custom-[a-zA-Z0-9-_]{3,}$";

// Resident IDP Username Recovery Configs.
public static final String USERNAME_RECOVERY_PROPERTY = "Recovery.Notification.Username.Enable";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ public static IdentityProvider createIdPWithUserDefinedFederatedAuthenticatorCon
UserDefinedFederatedAuthenticatorConfig userDefinedFederatedAuthenticatorConfig = new
UserDefinedFederatedAuthenticatorConfig();
userDefinedFederatedAuthenticatorConfig.setDisplayName("DisplayName1");
userDefinedFederatedAuthenticatorConfig.setName("custom_FedAuthenticator");
userDefinedFederatedAuthenticatorConfig.setName("custom-FedAuthenticator");
userDefinedFederatedAuthenticatorConfig.setEnabled(true);
userDefinedFederatedAuthenticatorConfig.setEndpointConfig(
buildUserDefinedAuthenticatorEndpointConfig(endpointConfig));
Expand Down

0 comments on commit 67dbed1

Please sign in to comment.