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 baa62d5 commit c5cb781
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -283,7 +283,7 @@ public UserDefinedLocalAuthenticatorConfig getUserDefinedLocalAuthenticator(Stri
}

/**
* Check whether an any local of federated authenticator configuration with the given name exists.
* Check whether any local or federated authenticator configuration exists with the given name.
*
* @param authenticatorName Name of the authenticator.
* @param tenantDomain Tenant domain.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ void deleteUserDefinedLocalAuthenticator(String authenticatorConfigName, UserDef
authenticatorConfig, int tenantId) throws AuthenticatorMgtException;

/**
* Check whether an any local of federated authenticator configuration with the given name exists.
* Check whether any local or federated authenticator configuration exists with the given name.
*
* @param authenticatorName Name of the authenticator.
* @param tenantId Tenant Id.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ public enum AuthenticatorMgtError {
ERROR_CODE_HAVING_MULTIPLE_PROP("65013", "Multiple properties found", "Only actionId " +
"property is allowed for authenticator: %s."),
ERROR_WHILE_CHECKING_FOR_EXISTING_AUTHENTICATOR_BY_NAME("65014", "Error while retrieving " +
"authenticator.", "Error while check any authenticator exists by given name: %s.");
"authenticator.", "Error while checking if an authenticator exists with the given name: %s.");

private final String code;
private final String message;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*/
public class UserDefinedLocalAuthenticatorValidator {

private static final String AUTHENTICATOR_NAME_REGEX = "^custom_[a-zA-Z0-9-_]{3,}$";
private static final String AUTHENTICATOR_NAME_REGEX = "^custom-[a-zA-Z0-9-_]{3,}$";
private final Pattern authenticatorNameRegexPattern = Pattern.compile(AUTHENTICATOR_NAME_REGEX);

private static final String DISPLAY_NAME_REGEX = "^.{3,}$";
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 @@ -668,7 +668,7 @@ public enum ErrorMessage {
ERROR_CODE_DELETING_ENDPOINT_CONFIG("IDP-65012", "An error occurred while deleting" +
" endpoint configuration for authenticator: %s."),
ERROR_CODE_ADDING_FEDERATED_AUTHENTICATOR("IDP-6501",
"An error occurred while validating Federated authenticator name."),;
"An error occurred while validating federated authenticator name."),;

private final String code;
private final String message;
Expand Down

0 comments on commit c5cb781

Please sign in to comment.