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...) 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 | |
85 // Iterate through the challenge headers, and pick the best one that | 81 // Iterate through the challenge headers, and pick the best one that |
86 // we support. Obtains the implementation class for handling the challenge, | 82 // we support. Obtains the implementation class for handling the challenge, |
87 // and passes it back in |*handler|. If the existing handler in |*handler| | 83 // and passes it back in |*handler|. If the existing handler in |*handler| |
88 // should continue to be used (such as for the NTLM authentication scheme), | 84 // should continue to be used (such as for the NTLM authentication scheme), |
89 // |*handler| is unchanged. If no supported challenge was found, |*handler| | 85 // |*handler| is unchanged. If no supported challenge was found, |*handler| |
90 // is set to NULL. | 86 // is set to NULL. |
91 // | 87 // |
92 // |origin| is used by the NTLM authentication scheme to construct the | 88 // |origin| is used by the NTLM authentication scheme to construct the |
93 // service principal name. It is ignored by other schemes. | 89 // service principal name. It is ignored by other schemes. |
94 // | 90 // |
(...skipping 96 matching lines...) Loading... |
191 std::string::const_iterator value_end_; | 187 std::string::const_iterator value_end_; |
192 | 188 |
193 bool value_is_quoted_; | 189 bool value_is_quoted_; |
194 bool expect_base64_token_; | 190 bool expect_base64_token_; |
195 }; | 191 }; |
196 }; | 192 }; |
197 | 193 |
198 } // namespace net | 194 } // namespace net |
199 | 195 |
200 #endif // NET_HTTP_HTTP_AUTH_H_ | 196 #endif // NET_HTTP_HTTP_AUTH_H_ |
OLD | NEW |