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_NEGOTIATE_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ |
6 #define NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ | 6 #define NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 bool use_port); | 101 bool use_port); |
102 | 102 |
103 virtual ~HttpAuthHandlerNegotiate(); | 103 virtual ~HttpAuthHandlerNegotiate(); |
104 | 104 |
105 // These are public for unit tests | 105 // These are public for unit tests |
106 std::wstring CreateSPN(const AddressList& address_list, const GURL& orign); | 106 std::wstring CreateSPN(const AddressList& address_list, const GURL& orign); |
107 const std::wstring& spn() const { return spn_; } | 107 const std::wstring& spn() const { return spn_; } |
108 | 108 |
109 // HttpAuthHandler: | 109 // HttpAuthHandler: |
110 virtual HttpAuth::AuthorizationResult HandleAnotherChallenge( | 110 virtual HttpAuth::AuthorizationResult HandleAnotherChallenge( |
111 HttpAuth::ChallengeTokenizer* challenge); | 111 HttpAuth::ChallengeTokenizer* challenge) OVERRIDE; |
112 virtual bool NeedsIdentity(); | 112 virtual bool NeedsIdentity() OVERRIDE; |
113 virtual bool AllowsDefaultCredentials(); | 113 virtual bool AllowsDefaultCredentials() OVERRIDE; |
| 114 virtual bool AllowsExplicitCredentials() OVERRIDE; |
114 | 115 |
115 protected: | 116 protected: |
116 virtual bool Init(HttpAuth::ChallengeTokenizer* challenge); | 117 virtual bool Init(HttpAuth::ChallengeTokenizer* challenge); |
117 | 118 |
118 virtual int GenerateAuthTokenImpl(const string16* username, | 119 virtual int GenerateAuthTokenImpl(const string16* username, |
119 const string16* password, | 120 const string16* password, |
120 const HttpRequestInfo* request, | 121 const HttpRequestInfo* request, |
121 CompletionCallback* callback, | 122 CompletionCallback* callback, |
122 std::string* auth_token); | 123 std::string* auth_token); |
123 | 124 |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
162 std::string* auth_token_; | 163 std::string* auth_token_; |
163 | 164 |
164 State next_state_; | 165 State next_state_; |
165 | 166 |
166 const URLSecurityManager* url_security_manager_; | 167 const URLSecurityManager* url_security_manager_; |
167 }; | 168 }; |
168 | 169 |
169 } // namespace net | 170 } // namespace net |
170 | 171 |
171 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ | 172 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ |
OLD | NEW |