Skip to content

Commit

Permalink
Add proxy port and protocol to variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
JeethJJ committed Jan 18, 2024
1 parent 220b1e7 commit 6416f39
Showing 1 changed file with 5 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -235,6 +235,8 @@ public Properties getDefaultPropertyValues(String tenantDomain) throws IdentityG
String enableAdminPasswordResetAutoLoginProperty = "false";
String recoveryMaxFailedAttempts = "3";
String recoveryMaxResendAttempts = "5";
int httpsProxyPort = 443;
String secureHttpProtocol = "https";

String notificationBasedPasswordRecovery = IdentityUtil.getProperty(
IdentityRecoveryConstants.ConnectorConfig.NOTIFICATION_BASED_PW_RECOVERY);
Expand Down Expand Up @@ -362,11 +364,11 @@ public Properties getDefaultPropertyValues(String tenantDomain) throws IdentityG
if (StringUtils.isNotEmpty(recoveryCallbackRegexProperty)) {
try {
int proxyPort = ServiceURLBuilder.create().build().getPort();
if (proxyPort == 443 && recoveryCallbackRegexProperty.contains("https")
&& recoveryCallbackRegexProperty.contains(":443\\")) {
if (proxyPort == httpsProxyPort && recoveryCallbackRegexProperty.contains(secureHttpProtocol)
&& recoveryCallbackRegexProperty.contains(":" + httpsProxyPort + "\\")) {
// remove 443 if added to the regex since it's the proxy port.
recoveryCallbackRegexProperty = recoveryCallbackRegexProperty + "|" +
recoveryCallbackRegexProperty.replace(":443\\", "\\");
recoveryCallbackRegexProperty.replace(":" + httpsProxyPort + "\\", "\\");
}
} catch (URLBuilderException e) {
throw new IdentityGovernanceException(e);
Expand Down

0 comments on commit 6416f39

Please sign in to comment.