Refactor few xml configurations read methods in IdentityUtil
@@ -1050,12 +1050,10 @@ public class IdentityUtil {
* @return true if the EnableRecoveryEndpoint. False if it doesnt
*/
public static boolean isRecoveryEPAvailable() {
+
String enableRecoveryEPUrlProperty = getProperty(ENABLE_RECOVERY_ENDPOINT);
- if (StringUtils.isNotBlank(enableRecoveryEPUrlProperty)) {
return Boolean.parseBoolean(enableRecoveryEPUrlProperty);
}
- return false;
- }
/**
* Returns whether the self signup endpoint is available or not.
@@ -1063,12 +1061,10 @@ public class IdentityUtil {
* @return true if the EnableSelfSignUpEndpoint. False if it doesnt
*/
public static boolean isSelfSignUpEPAvailable() {
+
String enableSelfSignEPUpUrlProperty = getProperty(ENABLE_SELF_SIGN_UP_ENDPOINT);
- if (StringUtils.isNotBlank(enableSelfSignEPUpUrlProperty)) {
return Boolean.parseBoolean(enableSelfSignEPUpUrlProperty);
}
- return false;
- }
/**
* Returns whether the email based username is enabled or not.
@@ -1076,12 +1072,10 @@ public class IdentityUtil {
* @return true if the EnableEmailUserName. False if it doesnt
*/
public static boolean isEmailUsernameEnabled() {
+
String enableEmailUsernameProperty = ServerConfiguration.getInstance().getFirstProperty(ENABLE_EMAIL_USERNAME);
- if (StringUtils.isNotBlank(enableEmailUsernameProperty)) {
return Boolean.parseBoolean(enableEmailUsernameProperty);
}
- return false;
- }
/**
*
