code: protected String getFQDN(URI requestURI) throws UnknownHostException {
          String host = requestURI.getHost();
          InetAddress address = InetAddress.getByName(host);
          return address.getCanonicalHostName();
      }
docs: Get the FQDN of the request uri's address, reverse resolving if needed.
  @param requestURI URI of the request that needs authentication
  @return FQDN of the uri
  @throws UnknownHostException if the address cannot be resolved