class Http {

    static String authenticatingCredentials(HttpServletRequest request,
            Authority authority) {
        final String header = authority.getHeader();
        if (header == null) {
            return null;
        }
        return header.startsWith("Cookie.") ? getCookieValue(request,
                header.substring(7)) : request.getHeader(header);
    }

}