| Index: net/http/http_auth_handler.h
|
| diff --git a/net/http/http_auth_handler.h b/net/http/http_auth_handler.h
|
| index bf01bc371bc6b0e8b1322e215d7e9c8c4ff63038..5aa39c5b01e06bf51566dae7973f03713c946bb2 100644
|
| --- a/net/http/http_auth_handler.h
|
| +++ b/net/http/http_auth_handler.h
|
| @@ -30,10 +30,10 @@ class NET_EXPORT_PRIVATE HttpAuthHandler {
|
| // authentication scheme, but none of the tokens occurring after the
|
| // authentication scheme. |target| and |origin| are both stored
|
| // for later use, and are not part of the initial challenge.
|
| - bool InitFromChallenge(HttpAuthChallengeTokenizer* challenge,
|
| - HttpAuth::Target target,
|
| - const GURL& origin,
|
| - const BoundNetLog& net_log);
|
| + int HandleInitialChallenge(const HttpAuthChallengeTokenizer& challenge,
|
| + HttpAuth::Target target,
|
| + const GURL& origin,
|
| + const BoundNetLog& net_log);
|
|
|
| // Determines how the previous authorization attempt was received.
|
| //
|
| @@ -49,7 +49,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandler {
|
| // authentication scheme, but none of the tokens occurring after the
|
| // authentication scheme.
|
| virtual HttpAuth::AuthorizationResult HandleAnotherChallenge(
|
| - HttpAuthChallengeTokenizer* challenge) = 0;
|
| + const HttpAuthChallengeTokenizer& challenge) = 0;
|
|
|
| // Generates an authentication token, potentially asynchronously.
|
| //
|
| @@ -72,7 +72,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandler {
|
| // All other return codes indicate that there was a problem generating a
|
| // token, and the value of |*auth_token| is unspecified.
|
| int GenerateAuthToken(const AuthCredentials* credentials,
|
| - const HttpRequestInfo* request,
|
| + const HttpRequestInfo& request,
|
| const CompletionCallback& callback,
|
| std::string* auth_token);
|
|
|
| @@ -105,9 +105,9 @@ class NET_EXPORT_PRIVATE HttpAuthHandler {
|
| virtual bool NeedsIdentity();
|
|
|
| // 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.
|
| - // NOTE: SSO is a potential security risk.
|
| + // into |HandleInitialChallenge|. If true, the user does not need to be
|
| + // prompted for username and password to establish credentials. NOTE: SSO is
|
| + // a potential security risk.
|
| // TODO(cbentzel): Add a pointer to Firefox documentation about risk.
|
| virtual bool AllowsDefaultCredentials();
|
|
|
| @@ -117,19 +117,18 @@ class NET_EXPORT_PRIVATE HttpAuthHandler {
|
| virtual bool AllowsExplicitCredentials();
|
|
|
| protected:
|
| - // Initializes the handler using a challenge issued by a server.
|
| - // |challenge| must be non-NULL and have already tokenized the
|
| - // authentication scheme, but none of the tokens occurring after the
|
| - // authentication scheme.
|
| - // Implementations are expected to initialize the following members:
|
| - // scheme_, realm_
|
| - virtual bool Init(HttpAuthChallengeTokenizer* challenge) = 0;
|
| + // Initializes the handler using a challenge issued by a server. |challenge|
|
| + // must be non-NULL and have already tokenized the authentication scheme, but
|
| + // none of the tokens occurring after the authentication scheme.
|
| + // Implementations are expected to initialize the following members: scheme_,
|
| + // realm_
|
| + virtual int Init(const HttpAuthChallengeTokenizer& challenge) = 0;
|
|
|
| // |GenerateAuthTokenImpl()} is the auth-scheme specific implementation
|
| // of generating the next auth token. Callers should use |GenerateAuthToken()|
|
| // which will in turn call |GenerateAuthTokenImpl()|
|
| virtual int GenerateAuthTokenImpl(const AuthCredentials* credentials,
|
| - const HttpRequestInfo* request,
|
| + const HttpRequestInfo& request,
|
| const CompletionCallback& callback,
|
| std::string* auth_token) = 0;
|
|
|
|
|