| 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_HANDLER_NTLM_H_ | 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_NTLM_H_ |
| 6 #define NET_HTTP_HTTP_AUTH_HANDLER_NTLM_H_ | 6 #define NET_HTTP_HTTP_AUTH_HANDLER_NTLM_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "build/build_config.h" | 9 #include "build/build_config.h" |
| 10 | 10 |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 107 #endif | 107 #endif |
| 108 | 108 |
| 109 virtual bool NeedsIdentity(); | 109 virtual bool NeedsIdentity(); |
| 110 | 110 |
| 111 virtual bool AllowsDefaultCredentials(); | 111 virtual bool AllowsDefaultCredentials(); |
| 112 | 112 |
| 113 virtual HttpAuth::AuthorizationResult HandleAnotherChallenge( | 113 virtual HttpAuth::AuthorizationResult HandleAnotherChallenge( |
| 114 HttpAuth::ChallengeTokenizer* challenge); | 114 HttpAuth::ChallengeTokenizer* challenge); |
| 115 | 115 |
| 116 protected: | 116 protected: |
| 117 // This function acquires a credentials handle in the SSPI implementation. |
| 118 // It does nothing in the portable implementation. |
| 119 int InitializeBeforeFirstChallenge(); |
| 120 |
| 117 virtual bool Init(HttpAuth::ChallengeTokenizer* tok); | 121 virtual bool Init(HttpAuth::ChallengeTokenizer* tok); |
| 118 | 122 |
| 119 virtual int GenerateAuthTokenImpl(const string16* username, | 123 virtual int GenerateAuthTokenImpl(const string16* username, |
| 120 const string16* password, | 124 const string16* password, |
| 121 const HttpRequestInfo* request, | 125 const HttpRequestInfo* request, |
| 122 CompletionCallback* callback, | 126 CompletionCallback* callback, |
| 123 std::string* auth_token); | 127 std::string* auth_token); |
| 124 | 128 |
| 125 // This function acquires a credentials handle in the SSPI implementation. | |
| 126 // It does nothing in the portable implementation. | |
| 127 int InitializeBeforeFirstChallenge(); | |
| 128 | |
| 129 private: | 129 private: |
| 130 ~HttpAuthHandlerNTLM(); | 130 ~HttpAuthHandlerNTLM(); |
| 131 | 131 |
| 132 #if defined(NTLM_PORTABLE) | 132 #if defined(NTLM_PORTABLE) |
| 133 // For unit tests to override the GenerateRandom and GetHostName functions. | 133 // For unit tests to override the GenerateRandom and GetHostName functions. |
| 134 // Returns the old function. | 134 // Returns the old function. |
| 135 static GenerateRandomProc SetGenerateRandomProc(GenerateRandomProc proc); | 135 static GenerateRandomProc SetGenerateRandomProc(GenerateRandomProc proc); |
| 136 static HostNameProc SetHostNameProc(HostNameProc proc); | 136 static HostNameProc SetHostNameProc(HostNameProc proc); |
| 137 #endif | 137 #endif |
| 138 | 138 |
| (...skipping 29 matching lines...) Expand all Loading... |
| 168 std::string auth_data_; | 168 std::string auth_data_; |
| 169 | 169 |
| 170 #if defined(NTLM_SSPI) | 170 #if defined(NTLM_SSPI) |
| 171 URLSecurityManager* url_security_manager_; | 171 URLSecurityManager* url_security_manager_; |
| 172 #endif | 172 #endif |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 } // namespace net | 175 } // namespace net |
| 176 | 176 |
| 177 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NTLM_H_ | 177 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NTLM_H_ |
| OLD | NEW |