Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(208)

Side by Side Diff: net/http/http_auth_gssapi_posix.cc

Issue 7748033: Don't try to use explicit credentials with schemes that don't support it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Unit test Created 9 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « net/http/http_auth_gssapi_posix.h ('k') | net/http/http_auth_handler.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include "net/http/http_auth_gssapi_posix.h" 5 #include "net/http/http_auth_gssapi_posix.h"
6 6
7 #include <limits> 7 #include <limits>
8 #include <string> 8 #include <string>
9 9
10 #include "base/base64.h" 10 #include "base/base64.h"
(...skipping 658 matching lines...) Expand 10 before | Expand all | Expand 10 after
669 bool HttpAuthGSSAPI::Init() { 669 bool HttpAuthGSSAPI::Init() {
670 if (!library_) 670 if (!library_)
671 return false; 671 return false;
672 return library_->Init(); 672 return library_->Init();
673 } 673 }
674 674
675 bool HttpAuthGSSAPI::NeedsIdentity() const { 675 bool HttpAuthGSSAPI::NeedsIdentity() const {
676 return decoded_server_auth_token_.empty(); 676 return decoded_server_auth_token_.empty();
677 } 677 }
678 678
679 bool HttpAuthGSSAPI::AllowsExplicitCredentials() const {
680 return false;
681 }
682
679 void HttpAuthGSSAPI::Delegate() { 683 void HttpAuthGSSAPI::Delegate() {
680 can_delegate_ = true; 684 can_delegate_ = true;
681 } 685 }
682 686
683 HttpAuth::AuthorizationResult HttpAuthGSSAPI::ParseChallenge( 687 HttpAuth::AuthorizationResult HttpAuthGSSAPI::ParseChallenge(
684 HttpAuth::ChallengeTokenizer* tok) { 688 HttpAuth::ChallengeTokenizer* tok) {
685 // Verify the challenge's auth-scheme. 689 // Verify the challenge's auth-scheme.
686 if (!LowerCaseEqualsASCII(tok->scheme(), StringToLowerASCII(scheme_).c_str())) 690 if (!LowerCaseEqualsASCII(tok->scheme(), StringToLowerASCII(scheme_).c_str()))
687 return HttpAuth::AUTHORIZATION_RESULT_INVALID; 691 return HttpAuth::AUTHORIZATION_RESULT_INVALID;
688 692
(...skipping 194 matching lines...) Expand 10 before | Expand all | Expand 10 after
883 if (rv != OK) { 887 if (rv != OK) {
884 LOG(ERROR) << "Problem initializing context. \n" 888 LOG(ERROR) << "Problem initializing context. \n"
885 << DisplayExtendedStatus(library_, major_status, minor_status) 889 << DisplayExtendedStatus(library_, major_status, minor_status)
886 << '\n' 890 << '\n'
887 << DescribeContext(library_, scoped_sec_context_.get()); 891 << DescribeContext(library_, scoped_sec_context_.get());
888 } 892 }
889 return rv; 893 return rv;
890 } 894 }
891 895
892 } // namespace net 896 } // namespace net
OLDNEW
« no previous file with comments | « net/http/http_auth_gssapi_posix.h ('k') | net/http/http_auth_handler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698