/** * Obtain the Domain Name from the given URL. An inappropriate URL will * throw an Exception. * * @param url The URL string to parse from. * @return String domain name. * @throws IOException If anything goes awry during URL handling. */ public static String getDomainName(final URL url) throws IOException { final InetAddress address = InetAddress.getByName(url.getHost()); final String fqdn = address.getHostName(); return getDomainName(fqdn); }
publicCred.add(new SSOCookieCredential( cookieCredential.getSsoCookieValue(), NetUtil.getDomainName(serverName))); publicCred.add(AuthMethod.COOKIE);
NetUtil.getDomainName(request.getServerName()));
NetUtil.getDomainName(getRequest().getResourceRef().toUrl())); } catch (InvalidDelegationTokenException | IOException e) { log.debug("Cannot use SSO Cookie. Reason: "