try {
uri = new URI(rpUrl);
} catch (URISyntaxException e) {
log.error("Invalid relying party URL :" + rpUrl, e);
throw new IdentityException("Invalid relying party URL");
}
try {
url = uri.normalize().toURL();
url = new URL(url.getProtocol().toLowerCase(), url.getHost().toLowerCase(), url
.getPort(), url.getPath());
return url.toString();
} catch (MalformedURLException e) {
log.error("Malformed relying party URL :" + rpUrl, e);
throw new IdentityException("Malformed relying party URL");
}
}