summaryrefslogtreecommitdiffstats
path: root/net/http/http_auth_controller.h
Commit message (Collapse)AuthorAgeFilesLines
* base::Bind: Convert most of net/http.jhawkins@chromium.org2011-12-201-3/+2
| | | | | | | | | | BUG=none TEST=none R=csilv Review URL: http://codereview.chromium.org/8990001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@115220 0039d316-1c4b-4281-b951-d872f2087c98
* Use AuthCredentials throughout the network stack instead of username/password.cbentzel@chromium.org2011-10-281-7/+6
| | | | | | | | This is a refactor only - no behavior change should happen. Review URL: http://codereview.chromium.org/8340026 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@107766 0039d316-1c4b-4281-b951-d872f2087c98
* Begin CompletionCallback switchover.willchan@chromium.org2011-10-011-3/+3
| | | | | | | | | | | | | Rename CompletionCallback to OldCompletionCallback in preparation for introducing a new CompletionCallback based on base::Callback. Also renames other CompletionCallback types like CancelableCompletionCallback and TestCompletionCallback and CompletionCallbackImpl. All using sed with s/CompletionCallback/OldCompletionCallback/g. BUG=98719 TEST=none Review URL: http://codereview.chromium.org/8070013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103650 0039d316-1c4b-4281-b951-d872f2087c98
* Don't try to use explicit credentials with schemes that don't support it.asanka@chromium.org2011-08-311-0/+1
| | | | | | | | | | | BUG=94617 TEST=net_unittests --gtest_filter=HttpAuthControllerTest.NoExplicitCredentialsAllowed. Review URL: http://codereview.chromium.org/7748033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@98965 0039d316-1c4b-4281-b951-d872f2087c98
* Rename NET_API to NET_EXPORT, and rename NET_TEST to NET_EXPORT_PRIVATE.darin@chromium.org2011-08-121-2/+2
| | | | | | Review URL: http://codereview.chromium.org/7529043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@96560 0039d316-1c4b-4281-b951-d872f2087c98
* net: Add NET_API to the auth code.rvargas@google.com2011-05-201-2/+4
| | | | | | | | BUG=76997 TEST=NONE Review URL: http://codereview.chromium.org/7016043 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@86128 0039d316-1c4b-4281-b951-d872f2087c98
* Disable HTTP auth schemes on permanent errors.asanka@chromium.org2011-03-301-0/+5
| | | | | | | | | | | | | | | | | The underlying implementation for the Negotiate authentication scheme might return error codes that indicate error conditions that we are unlikely to recover from. If we see those, then treat these as permanent errors and disable the auth scheme for the rest of the transaction. We were already doing this partly for cases where there are no default credentials. This patch extends the behavior to additional error codes. BUG=49950 TEST=net_unittests --gtest_filter=HttpAuthControllerTest.PermanentErrors Review URL: http://codereview.chromium.org/6745018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79848 0039d316-1c4b-4281-b951-d872f2087c98
* Move some files from base to base/memory.levin@chromium.org2011-03-281-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | raw_scoped_refptr_mismatch_checker.h ref_counted.cc ref_counted.h ref_counted_memory.cc ref_counted_memory.h ref_counted_unittest.cc scoped_callback_factory.h scoped_comptr_win.h scoped_handle.h scoped_native_library.cc scoped_native_library.h scoped_native_library_unittest.cc scoped_nsobject.h scoped_open_process.h scoped_ptr.h scoped_ptr_unittest.cc scoped_temp_dir.cc scoped_temp_dir.h scoped_temp_dir_unittest.cc scoped_vector.h singleton.h singleton_objc.h singleton_unittest.cc linked_ptr.h linked_ptr_unittest.cc weak_ptr.cc weak_ptr.h weak_ptr_unittest.cc BUG=None TEST=Compile Review URL: http://codereview.chromium.org/6714032 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@79524 0039d316-1c4b-4281-b951-d872f2087c98
* Fix realm selection when handling Basic authentication.asanka@chromium.org2011-02-241-1/+3
| | | | | | | | | | | | | | | Clarify comments and fix realm selection in HttpAuthHandlerBasic::HandleAnotherChallenge() to match the selection in HttpAuthHandlerBasic::ParseChallenge(). This is cleanup for r75390. BUG=none TEST=net_unittests --gtest_filter=HttpAuthHandlerBasicTest.* Review URL: http://codereview.chromium.org/6574003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75889 0039d316-1c4b-4281-b951-d872f2087c98
* Check and invalidate cached credentials if they were used for preemptive ↵asanka@chromium.org2011-02-181-1/+7
| | | | | | | | | | | authentication and were rejected by the server. BUG=72589 TEST=net_unittests --gtest_filter=HttpAuthHandler*.HandleAnotherChallenge Review URL: http://codereview.chromium.org/6525035 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@75390 0039d316-1c4b-4281-b951-d872f2087c98
* Cleanup: Use AUTH_SCHEME enum instead of a string.cbentzel@chromium.org2011-01-131-3/+3
| | | | | | | | | BUG=None TEST=trybots Review URL: http://codereview.chromium.org/6191001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@71318 0039d316-1c4b-4281-b951-d872f2087c98
* Move non_thread_safe from base to base/threading and into the base namespace.brettw@chromium.org2011-01-011-2/+2
| | | | | | | | TEST=it compiles BUG=none Review URL: http://codereview.chromium.org/6005010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@70351 0039d316-1c4b-4281-b951-d872f2087c98
* Even more virtual method deinlining.erg@google.com2010-12-131-6/+2
| | | | | | | | | BUG=none TEST=compiles Review URL: http://codereview.chromium.org/5741001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@69041 0039d316-1c4b-4281-b951-d872f2087c98
* Add Net.HttpAuthCount histogram to track failure rate per authentication scheme.cbentzel@chromium.org2010-10-111-1/+3
| | | | | | | | | | | | | | | This suffers from a few potential issues, stemming from the lack of feedback of whether an authentication attempt succeeded. - It will count failures from preemptive authentication but not preemptive authentication attempts. - It will count challenges which do not result in Authorize headers being sent back up (UrlFetcher requests before HttpAuthCache is populated, user canceling an auth attempt). Still, it seems better than having no insight right now. If it's too noisy I'll look at ways to improve it. BUG=57628 TEST=Manually verified that histogram counts worked. Review URL: http://codereview.chromium.org/3590012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@62158 0039d316-1c4b-4281-b951-d872f2087c98
* Break reference cycle from HttpProxyClientSocket=>HttpNetworkSession=>...willchan@chromium.org2010-09-171-6/+14
| | | | | | | | | | | | Note that this undoes the fix for http://crbug.com/49387 which is now unnecessary without the cycle. Some other miscellaneous cleanup is thrown in here. BUG=55175 TEST=none Review URL: http://codereview.chromium.org/3418018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59873 0039d316-1c4b-4281-b951-d872f2087c98
* Fix multi-round authentication.cbentzel@chromium.org2010-09-111-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | In the case of Negotiate, authentication can look like C: GET S: 401, WWW-Authenticate: Negotiate C: GET, WWW-Authorization: Negotiate <client_token_1> S: 401, WWW-Authenticate: Negotiate <server_token_1> C: GET, WWW-Authorization: Negotiate <client_token_2> S: 401, WWW-Authenticate: Negotiate <server_token_2> on that third challenge, the handler was reported as being in "the final round" and this was treated as a rejection of the authentication attempt. After that, the new challenge token was used by a new auth handler that hadn't established a security context, and an ERR_INVALID_HANDLE would be returned. This CL also does some prep work to correctly handle the "stale=true" value for Digest authentication, but I decided to defer the HttpAuthCache changes needed for that to a separate CL since this was large enough. BUG=53282 TEST=net_unittests. Unfortunately, I haven't been able to set up a proxy/server to do more than two auth challenges, but this does happen in the wild. Review URL: http://codereview.chromium.org/3360017 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@59188 0039d316-1c4b-4281-b951-d872f2087c98
* Remove obviously unneeded forward declarations from headers under ↵viettrungluu@chromium.org2010-08-211-1/+0
| | | | | | | | | | | src/{app,base,net}. BUG=none TEST=builds Review URL: http://codereview.chromium.org/3136025 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@56995 0039d316-1c4b-4281-b951-d872f2087c98
* FBTF: Start cleaning up net/erg@google.com2010-08-111-3/+1
| | | | | | | | | | | | url_request.h and http_response_info.h are some of the most included headers from net/ in chrome. Do what forward declaration we can in those headers. BUG=none TEST=none Review URL: http://codereview.chromium.org/3150003 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@55780 0039d316-1c4b-4281-b951-d872f2087c98
* Net: Convert username and password to string16.thestig@chromium.org2010-07-291-2/+3
| | | | | | | | BUG=none TEST=none Review URL: http://codereview.chromium.org/3040016 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@54101 0039d316-1c4b-4281-b951-d872f2087c98
* `#pragma once` for app, base, chrome, gfx, ipc, net, skia, viewsthakis@chromium.org2010-07-261-0/+1
| | | | | | | | | BUG=50273 TEST=everything still builds, build is 10% faster on windows, same speed on mac/linux TBR: erg git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53716 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt to back off from Kerberos authentication if we don't have credentials.ahendrickson@google.com2010-07-201-0/+11
| | | | | | | | | | | | | | | | | | | If the user has a stale TGT, or is unable to generate a TGS for the server they are trying to communicate to, then generating an authentication token fails. Rather than fail the entire network transaction in that case, we resend the request with an empty Authenticate (or Proxy-Authenticate) header, and remember that the Negotiate scheme is not a valid option for this particular transaction. If the server responds back with headers like WWW-Authenticate: Negotiate WWW-Authenticate: Digest realm=foo then the digest scheme is chosen in the next round. BUG=33033 TEST=None Review URL: http://codereview.chromium.org/3010010 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@53002 0039d316-1c4b-4281-b951-d872f2087c98
* Remove |net_log_| as a class member and pass it in where needed and a little ↵vandebo@chromium.org2010-07-131-11/+7
| | | | | | | | | | | cleanup. BUG=42795 TEST=existing unit tests Review URL: http://codereview.chromium.org/2806052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52214 0039d316-1c4b-4281-b951-d872f2087c98
* Put HttpProxyClientSocket into a pool.vandebo@chromium.org2010-07-121-11/+17
| | | | | | | | | | | | | | | This CL requires http://codereview.chromium.org/2799036 - Cleanup the HttpProxyClientSocket interface a touch. - Make HttpAuthController reference counted. - Enable ClientSocketPool to return recoverable connections. BUG=42795 TEST=existing unit tests Review URL: http://codereview.chromium.org/2817033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52104 0039d316-1c4b-4281-b951-d872f2087c98
* Implement HttpProxyClientSocket: Http proxie setup is now done in it's own ↵vandebo@chromium.org2010-07-121-1/+6
| | | | | | | | | | | class (refactor). BUG=42795 TEST=existing unit tests Review URL: http://codereview.chromium.org/2799036 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@52100 0039d316-1c4b-4281-b951-d872f2087c98
* Make the Negotiate Authentication Handler a state machine.cbentzel@chromium.org2010-07-011-5/+2
| | | | | | | | | | | | | | Now that the HttpNetworkTransaction correctly handles asynchronous auth token generation, HttpAuthHandlerNegotiate can be turned into a state machine. This also removes the need for the externally exposed "Resolve Canonical Name" details to users of this handler. BUG=42222 TEST=net_unittests Review URL: http://codereview.chromium.org/2867022 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@51387 0039d316-1c4b-4281-b951-d872f2087c98
* Create HttpAuthController. (again)vandebo@chromium.org2010-06-241-0/+134
| | | | | | | | | | | | This packages up the auth state into a single class to enable a HttpProxyClientSocket class (which is needed for SSLClientSocketPool). Fix memory leak. BUG=30357 TEST=existing unit tests Review URL: http://codereview.chromium.org/2808020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50696 0039d316-1c4b-4281-b951-d872f2087c98
* Revert 50647 - Create HttpAuthController.vandebo@chromium.org2010-06-231-135/+0
| | | | | | | | | | | | | | | | 'Memory tests' is not happy. This packages up the auth state into a single class to enable a HttpProxyClientSocket class (which is needed for SSLClientSocketPool). BUG=30357 TEST=existing unit tests Review URL: http://codereview.chromium.org/2808020 TBR=vandebo@chromium.org Review URL: http://codereview.chromium.org/2866018 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50669 0039d316-1c4b-4281-b951-d872f2087c98
* Create HttpAuthController.vandebo@chromium.org2010-06-231-0/+135
This packages up the auth state into a single class to enable a HttpProxyClientSocket class (which is needed for SSLClientSocketPool). BUG=30357 TEST=existing unit tests Review URL: http://codereview.chromium.org/2808020 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@50647 0039d316-1c4b-4281-b951-d872f2087c98