src/share/classes/sun/net/www/protocol/http/DigestAuthentication.java

Print this page

        

*** 198,223 **** } /** * @return true if this authentication supports preemptive authorization */ ! boolean supportsPreemptiveAuthorization() { return true; } /** - * @return the name of the HTTP header this authentication wants set - */ - String getHeaderName() { - if (type == SERVER_AUTHENTICATION) { - return "Authorization"; - } else { - return "Proxy-Authorization"; - } - } - - /** * Reclaculates the request-digest and returns it. * * <P> Used in the common case where the requestURI is simply the * abs_path. * --- 198,213 ---- } /** * @return true if this authentication supports preemptive authorization */ ! @Override ! public boolean supportsPreemptiveAuthorization() { return true; } /** * Reclaculates the request-digest and returns it. * * <P> Used in the common case where the requestURI is simply the * abs_path. *
*** 227,237 **** * @param method * the HTTP method * * @return the value of the HTTP header this authentication wants set */ ! String getHeaderValue(URL url, String method) { return getHeaderValueImpl(url.getFile(), method); } /** * Reclaculates the request-digest and returns it. --- 217,228 ---- * @param method * the HTTP method * * @return the value of the HTTP header this authentication wants set */ ! @Override ! public String getHeaderValue(URL url, String method) { return getHeaderValueImpl(url.getFile(), method); } /** * Reclaculates the request-digest and returns it.
*** 257,267 **** * and return true. Otherwise return false. * returning true means the request can be retried with the same userid/password * returning false means we have to go back to the user to ask for a new * username password. */ ! boolean isAuthorizationStale (String header) { HeaderParser p = new HeaderParser (header); String s = p.findValue ("stale"); if (s == null || !s.equals("true")) return false; String newNonce = p.findValue ("nonce"); --- 248,259 ---- * and return true. Otherwise return false. * returning true means the request can be retried with the same userid/password * returning false means we have to go back to the user to ask for a new * username password. */ ! @Override ! public boolean isAuthorizationStale (String header) { HeaderParser p = new HeaderParser (header); String s = p.findValue ("stale"); if (s == null || !s.equals("true")) return false; String newNonce = p.findValue ("nonce");
*** 277,287 **** * @param conn The connection to apply the header(s) to * @param p A source of header values for this connection, if needed. * @param raw Raw header values for this connection, if needed. * @return true if all goes well, false if no headers were set. */ ! boolean setHeaders(HttpURLConnection conn, HeaderParser p, String raw) { params.setNonce (p.findValue("nonce")); params.setOpaque (p.findValue("opaque")); params.setQop (p.findValue("qop")); String uri; --- 269,280 ---- * @param conn The connection to apply the header(s) to * @param p A source of header values for this connection, if needed. * @param raw Raw header values for this connection, if needed. * @return true if all goes well, false if no headers were set. */ ! @Override ! public boolean setHeaders(HttpURLConnection conn, HeaderParser p, String raw) { params.setNonce (p.findValue("nonce")); params.setOpaque (p.findValue("opaque")); params.setQop (p.findValue("qop")); String uri;