try {
uri = new URI(openID);
} catch (URISyntaxException e) {
log.error("Invalid OpenID URL :" + openID, e);
throw new IdentityProviderException("Invalid OpenID URL :" + openID, e);
}
try {
url = uri.normalize().toURL();
if (url.getQuery() != null || url.getRef() != null) {
log.error("Invalid user name for OpenID :" + openID);
throw new IdentityProviderException("Invalid user name for OpenID :" + openID);
}
} catch (MalformedURLException e) {
log.error("Malformed OpenID URL :" + openID, e);
throw new IdentityProviderException("Malformed OpenID URL :" + openID, e);
}
openID = url.toString();
if (log.isDebugEnabled()) {