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

Side by Side Diff: net/http/http_auth_handler.h

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.cc ('k') | net/http/http_auth_handler.cc » ('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 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_H_ 5 #ifndef NET_HTTP_HTTP_AUTH_HANDLER_H_
6 #define NET_HTTP_HTTP_AUTH_HANDLER_H_ 6 #define NET_HTTP_HTTP_AUTH_HANDLER_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
(...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after
128 // sequence used by a connection-based authentication scheme. 128 // sequence used by a connection-based authentication scheme.
129 virtual bool NeedsIdentity(); 129 virtual bool NeedsIdentity();
130 130
131 // Returns whether the default credentials may be used for the |origin| passed 131 // Returns whether the default credentials may be used for the |origin| passed
132 // into |InitFromChallenge|. If true, the user does not need to be prompted 132 // into |InitFromChallenge|. If true, the user does not need to be prompted
133 // for username and password to establish credentials. 133 // for username and password to establish credentials.
134 // NOTE: SSO is a potential security risk. 134 // NOTE: SSO is a potential security risk.
135 // TODO(cbentzel): Add a pointer to Firefox documentation about risk. 135 // TODO(cbentzel): Add a pointer to Firefox documentation about risk.
136 virtual bool AllowsDefaultCredentials(); 136 virtual bool AllowsDefaultCredentials();
137 137
138 // Returns whether explicit credentials can be used with this handler. If
139 // true the user may be prompted for credentials if an implicit identity
140 // cannot be determined.
141 virtual bool AllowsExplicitCredentials();
142
138 protected: 143 protected:
139 enum Property { 144 enum Property {
140 ENCRYPTS_IDENTITY = 1 << 0, 145 ENCRYPTS_IDENTITY = 1 << 0,
141 IS_CONNECTION_BASED = 1 << 1, 146 IS_CONNECTION_BASED = 1 << 1,
142 }; 147 };
143 148
144 // Initializes the handler using a challenge issued by a server. 149 // Initializes the handler using a challenge issued by a server.
145 // |challenge| must be non-NULL and have already tokenized the 150 // |challenge| must be non-NULL and have already tokenized the
146 // authentication scheme, but none of the tokens occuring after the 151 // authentication scheme, but none of the tokens occuring after the
147 // authentication scheme. 152 // authentication scheme.
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after
187 void OnGenerateAuthTokenComplete(int rv); 192 void OnGenerateAuthTokenComplete(int rv);
188 void FinishGenerateAuthToken(); 193 void FinishGenerateAuthToken();
189 194
190 CompletionCallback* original_callback_; 195 CompletionCallback* original_callback_;
191 CompletionCallbackImpl<HttpAuthHandler> wrapper_callback_; 196 CompletionCallbackImpl<HttpAuthHandler> wrapper_callback_;
192 }; 197 };
193 198
194 } // namespace net 199 } // namespace net
195 200
196 #endif // NET_HTTP_HTTP_AUTH_HANDLER_H_ 201 #endif // NET_HTTP_HTTP_AUTH_HANDLER_H_
OLDNEW
« no previous file with comments | « net/http/http_auth_gssapi_posix.cc ('k') | net/http/http_auth_handler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698