Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(540)

Unified Diff: net/http/http_auth_handler.h

Issue 3360017: Fix multi-round authentication.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: SocketStream fix Created 10 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « net/http/http_auth_gssapi_posix_unittest.cc ('k') | net/http/http_auth_handler_basic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: net/http/http_auth_handler.h
===================================================================
--- net/http/http_auth_handler.h (revision 59119)
+++ net/http/http_auth_handler.h (working copy)
@@ -38,6 +38,22 @@
const GURL& origin,
const BoundNetLog& net_log);
+ // Determines how the previous authorization attempt was received.
+ //
+ // This is called when the server/proxy responds with a 401/407 after an
+ // earlier authorization attempt. Although this normally means that the
+ // previous attempt was rejected, in multi-round schemes such as
+ // NTLM+Negotiate it may indicate that another round of challenge+response
+ // is required. For Digest authentication it may also mean that the previous
+ // attempt used a stale nonce (and nonce-count) and that a new attempt should
+ // be made with a different nonce provided in the challenge.
+ //
+ // |challenge| must be non-NULL and have already tokenized the
+ // authentication scheme, but none of the tokens occuring after the
+ // authentication scheme.
+ virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
+ HttpAuth::ChallengeTokenizer* challenge) = 0;
+
// Generates an authentication token, potentially asynchronously.
//
// When |username| and |password| are NULL, the default credentials for
@@ -107,11 +123,6 @@
// sequence used by a connection-based authentication scheme.
virtual bool NeedsIdentity() { return true; }
- // Returns true if this is the final round of the authentication sequence.
- // For Basic and Digest, the method always returns true because they are
- // single-round schemes.
- virtual bool IsFinalRound() { return true; }
-
// Returns whether the default credentials may be used for the |origin| passed
// into |InitFromChallenge|. If true, the user does not need to be prompted
// for username and password to establish credentials.
« no previous file with comments | « net/http/http_auth_gssapi_posix_unittest.cc ('k') | net/http/http_auth_handler_basic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698