| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_H_ |
| 6 #define NET_HTTP_HTTP_AUTH_HANDLER_H_ | 6 #define NET_HTTP_HTTP_AUTH_HANDLER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "net/base/completion_callback.h" | 10 #include "net/base/completion_callback.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 | 28 |
| 29 // Initializes the handler using a challenge issued by a server. | 29 // Initializes the handler using a challenge issued by a server. |
| 30 // |challenge| must be non-NULL and have already tokenized the | 30 // |challenge| must be non-NULL and have already tokenized the |
| 31 // authentication scheme, but none of the tokens occurring after the | 31 // authentication scheme, but none of the tokens occurring after the |
| 32 // authentication scheme. |target| and |origin| are both stored | 32 // authentication scheme. |target| and |origin| are both stored |
| 33 // for later use, and are not part of the initial challenge. | 33 // for later use, and are not part of the initial challenge. |
| 34 bool InitFromChallenge(HttpAuthChallengeTokenizer* challenge, | 34 bool InitFromChallenge(HttpAuthChallengeTokenizer* challenge, |
| 35 HttpAuth::Target target, | 35 HttpAuth::Target target, |
| 36 const SSLInfo& ssl_info, | 36 const SSLInfo& ssl_info, |
| 37 const GURL& origin, | 37 const GURL& origin, |
| 38 const BoundNetLog& net_log); | 38 const NetLogWithSource& net_log); |
| 39 | 39 |
| 40 // Determines how the previous authorization attempt was received. | 40 // Determines how the previous authorization attempt was received. |
| 41 // | 41 // |
| 42 // This is called when the server/proxy responds with a 401/407 after an | 42 // This is called when the server/proxy responds with a 401/407 after an |
| 43 // earlier authorization attempt. Although this normally means that the | 43 // earlier authorization attempt. Although this normally means that the |
| 44 // previous attempt was rejected, in multi-round schemes such as | 44 // previous attempt was rejected, in multi-round schemes such as |
| 45 // NTLM+Negotiate it may indicate that another round of challenge+response | 45 // NTLM+Negotiate it may indicate that another round of challenge+response |
| 46 // is required. For Digest authentication it may also mean that the previous | 46 // is required. For Digest authentication it may also mean that the previous |
| 47 // attempt used a stale nonce (and nonce-count) and that a new attempt should | 47 // attempt used a stale nonce (and nonce-count) and that a new attempt should |
| 48 // be made with a different nonce provided in the challenge. | 48 // be made with a different nonce provided in the challenge. |
| (...skipping 134 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 183 // The score for this challenge. Higher numbers are better. | 183 // The score for this challenge. Higher numbers are better. |
| 184 int score_; | 184 int score_; |
| 185 | 185 |
| 186 // Whether this authentication request is for a proxy server, or an | 186 // Whether this authentication request is for a proxy server, or an |
| 187 // origin server. | 187 // origin server. |
| 188 HttpAuth::Target target_; | 188 HttpAuth::Target target_; |
| 189 | 189 |
| 190 // A bitmask of the properties of the authentication scheme. | 190 // A bitmask of the properties of the authentication scheme. |
| 191 int properties_; | 191 int properties_; |
| 192 | 192 |
| 193 BoundNetLog net_log_; | 193 NetLogWithSource net_log_; |
| 194 | 194 |
| 195 private: | 195 private: |
| 196 void OnGenerateAuthTokenComplete(int rv); | 196 void OnGenerateAuthTokenComplete(int rv); |
| 197 void FinishGenerateAuthToken(); | 197 void FinishGenerateAuthToken(); |
| 198 | 198 |
| 199 CompletionCallback callback_; | 199 CompletionCallback callback_; |
| 200 }; | 200 }; |
| 201 | 201 |
| 202 } // namespace net | 202 } // namespace net |
| 203 | 203 |
| 204 #endif // NET_HTTP_HTTP_AUTH_HANDLER_H_ | 204 #endif // NET_HTTP_HTTP_AUTH_HANDLER_H_ |
| OLD | NEW |