Skip to content

Commit

Permalink
Merge pull request #209 from Akila94/remove-unwanted-aud-validation
Browse files Browse the repository at this point in the history
Remove unnecessary PAR audience validation
  • Loading branch information
aka4rKO authored Nov 29, 2024
2 parents 2b806c9 + 65d3746 commit 44611a8
Showing 1 changed file with 0 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,6 @@
import org.wso2.carbon.idp.mgt.IdentityProviderManager;
import org.wso2.carbon.utils.multitenancy.MultitenantConstants;

import java.net.MalformedURLException;
import java.net.URL;
import java.security.Key;
import java.security.PublicKey;
import java.security.cert.Certificate;
Expand Down Expand Up @@ -555,19 +553,6 @@ private static List<String> getAllowedPARAudienceValues(String tenantDomain)

// add IdPEntityID or the "issuer" as a valid "aud" value
validAudUrls.add(residentIdpAlias);

try {
URL residentIdPUrl = new URL(residentIdpAlias);
// derive PAR EP URL from the residentIdP base URL
URL parEpUrl = new URL(residentIdPUrl, IdentityCommonConstants.PAR_ENDPOINT);
// add PAR EP URL as a valid "aud" value
validAudUrls.add(parEpUrl.toString());
} catch (MalformedURLException exception) {
log.error("Error occurred while deriving PAR endpoint URL.", exception);
throw new PushAuthRequestValidatorException(HttpStatus.SC_INTERNAL_SERVER_ERROR,
OAuth2ErrorCodes.SERVER_ERROR, "Server Error while deriving PAR endpoint URL.", exception);
}

return validAudUrls;
}

Expand Down

0 comments on commit 44611a8

Please sign in to comment.