OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_H_ |
6 #define NET_HTTP_HTTP_AUTH_H_ | 6 #define NET_HTTP_HTTP_AUTH_H_ |
7 | 7 |
8 #include "base/scoped_ptr.h" | 8 #include "base/scoped_ptr.h" |
9 #include "net/http/http_util.h" | 9 #include "net/http/http_util.h" |
10 | 10 |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 }; | 71 }; |
72 | 72 |
73 // Get the name of the header containing the auth challenge | 73 // Get the name of the header containing the auth challenge |
74 // (either WWW-Authenticate or Proxy-Authenticate). | 74 // (either WWW-Authenticate or Proxy-Authenticate). |
75 static std::string GetChallengeHeaderName(Target target); | 75 static std::string GetChallengeHeaderName(Target target); |
76 | 76 |
77 // Get the name of the header where the credentials go | 77 // Get the name of the header where the credentials go |
78 // (either Authorization or Proxy-Authorization). | 78 // (either Authorization or Proxy-Authorization). |
79 static std::string GetAuthorizationHeaderName(Target target); | 79 static std::string GetAuthorizationHeaderName(Target target); |
80 | 80 |
| 81 // Returns a string representation of a Target value that can be used in log |
| 82 // messages. |
| 83 static std::string GetAuthTargetString(Target target); |
| 84 |
81 // Iterate through the challenge headers, and pick the best one that | 85 // Iterate through the challenge headers, and pick the best one that |
82 // we support. Obtains the implementation class for handling the challenge, | 86 // we support. Obtains the implementation class for handling the challenge, |
83 // and passes it back in |*handler|. If the existing handler in |*handler| | 87 // and passes it back in |*handler|. If the existing handler in |*handler| |
84 // should continue to be used (such as for the NTLM authentication scheme), | 88 // should continue to be used (such as for the NTLM authentication scheme), |
85 // |*handler| is unchanged. If no supported challenge was found, |*handler| | 89 // |*handler| is unchanged. If no supported challenge was found, |*handler| |
86 // is set to NULL. | 90 // is set to NULL. |
87 // | 91 // |
88 // |origin| is used by the NTLM authentication scheme to construct the | 92 // |origin| is used by the NTLM authentication scheme to construct the |
89 // service principal name. It is ignored by other schemes. | 93 // service principal name. It is ignored by other schemes. |
90 // | 94 // |
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
187 std::string::const_iterator value_end_; | 191 std::string::const_iterator value_end_; |
188 | 192 |
189 bool value_is_quoted_; | 193 bool value_is_quoted_; |
190 bool expect_base64_token_; | 194 bool expect_base64_token_; |
191 }; | 195 }; |
192 }; | 196 }; |
193 | 197 |
194 } // namespace net | 198 } // namespace net |
195 | 199 |
196 #endif // NET_HTTP_HTTP_AUTH_H_ | 200 #endif // NET_HTTP_HTTP_AUTH_H_ |
OLD | NEW |