| 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 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 74 // |auth_library|. | 74 // |auth_library|. |
| 75 void set_library(AuthLibrary* auth_provider) { | 75 void set_library(AuthLibrary* auth_provider) { |
| 76 auth_library_.reset(auth_provider); | 76 auth_library_.reset(auth_provider); |
| 77 } | 77 } |
| 78 | 78 |
| 79 // HttpAuthHandlerFactory | 79 // HttpAuthHandlerFactory |
| 80 scoped_ptr<HttpAuthHandler> CreateAuthHandlerForScheme( | 80 scoped_ptr<HttpAuthHandler> CreateAuthHandlerForScheme( |
| 81 const std::string& scheme) override; | 81 const std::string& scheme) override; |
| 82 scoped_ptr<HttpAuthHandler> CreateAndInitPreemptiveAuthHandler( | 82 scoped_ptr<HttpAuthHandler> CreateAndInitPreemptiveAuthHandler( |
| 83 HttpAuthCache::Entry* cache_entry, | 83 HttpAuthCache::Entry* cache_entry, |
| 84 const HttpAuthChallengeTokenizer& tokenizer, | |
| 85 HttpAuth::Target target, | 84 HttpAuth::Target target, |
| 86 const BoundNetLog& net_log) override; | 85 const BoundNetLog& net_log) override; |
| 87 | 86 |
| 88 private: | 87 private: |
| 89 bool disable_cname_lookup_; | 88 bool disable_cname_lookup_; |
| 90 bool use_port_; | 89 bool use_port_; |
| 91 HostResolver* resolver_; | 90 HostResolver* resolver_; |
| 92 #if defined(OS_WIN) | 91 #if defined(OS_WIN) |
| 93 ULONG max_token_length_; | 92 ULONG max_token_length_; |
| 94 #endif | 93 #endif |
| (...skipping 17 matching lines...) Expand all Loading... |
| 112 const std::string& spn() const { return spn_; } | 111 const std::string& spn() const { return spn_; } |
| 113 | 112 |
| 114 // HttpAuthHandler: | 113 // HttpAuthHandler: |
| 115 HttpAuth::AuthorizationResult HandleAnotherChallenge( | 114 HttpAuth::AuthorizationResult HandleAnotherChallenge( |
| 116 const HttpAuthChallengeTokenizer& challenge) override; | 115 const HttpAuthChallengeTokenizer& challenge) override; |
| 117 bool NeedsIdentity() override; | 116 bool NeedsIdentity() override; |
| 118 bool AllowsDefaultCredentials() override; | 117 bool AllowsDefaultCredentials() override; |
| 119 bool AllowsExplicitCredentials() override; | 118 bool AllowsExplicitCredentials() override; |
| 120 | 119 |
| 121 protected: | 120 protected: |
| 122 int Init(const HttpAuthChallengeTokenizer& challenge) override; | 121 // HttpAuthHandler |
| 123 | 122 int InitializeFromChallengeInternal( |
| 123 const HttpAuthChallengeTokenizer& challenge, |
| 124 const HttpResponseInfo& response_with_challenge, |
| 125 const CompletionCallback& callback) override; |
| 126 int InitializeFromCacheEntryInternal( |
| 127 HttpAuthCache::Entry* cache_entry) override; |
| 124 int GenerateAuthTokenImpl(const AuthCredentials* credentials, | 128 int GenerateAuthTokenImpl(const AuthCredentials* credentials, |
| 125 const HttpRequestInfo& request, | 129 const HttpRequestInfo& request, |
| 126 const CompletionCallback& callback, | 130 const CompletionCallback& callback, |
| 127 std::string* auth_token) override; | 131 std::string* auth_token) override; |
| 128 | 132 |
| 129 private: | 133 private: |
| 130 enum State { | 134 enum State { |
| 131 STATE_RESOLVE_CANONICAL_NAME, | 135 STATE_RESOLVE_CANONICAL_NAME, |
| 132 STATE_RESOLVE_CANONICAL_NAME_COMPLETE, | 136 STATE_RESOLVE_CANONICAL_NAME_COMPLETE, |
| 133 STATE_GENERATE_AUTH_TOKEN, | 137 STATE_GENERATE_AUTH_TOKEN, |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 std::string* auth_token_; | 169 std::string* auth_token_; |
| 166 | 170 |
| 167 State next_state_; | 171 State next_state_; |
| 168 | 172 |
| 169 const URLSecurityManager* url_security_manager_; | 173 const URLSecurityManager* url_security_manager_; |
| 170 }; | 174 }; |
| 171 | 175 |
| 172 } // namespace net | 176 } // namespace net |
| 173 | 177 |
| 174 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ | 178 #endif // NET_HTTP_HTTP_AUTH_HANDLER_NEGOTIATE_H_ |
| OLD | NEW |