summaryrefslogtreecommitdiffstats
path: root/net/http/http_auth_sspi_win.h
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-05 19:13:29 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-02-05 19:13:29 +0000
commitac3fa8e2ef53e83b113d726209525f4af4aa46f1 (patch)
treecf3550a3155d263943062b68ea5b205035d22182 /net/http/http_auth_sspi_win.h
parent5502208efd91894a34ef43a38d348b7f9acb3770 (diff)
downloadchromium_src-ac3fa8e2ef53e83b113d726209525f4af4aa46f1.zip
chromium_src-ac3fa8e2ef53e83b113d726209525f4af4aa46f1.tar.gz
chromium_src-ac3fa8e2ef53e83b113d726209525f4af4aa46f1.tar.bz2
Add Single Sign On support to HTTP Authentication handlers.
Currently this is implemented on Windows for the NTLM and Negotiate schemes. This CL does not introduce the hooks to actually use Single Sign On in response to a 401/407 request - that will come in a later CL. This behavior is disabled for now as well. BUG=29862 TEST=Ran unittests, and Chrome against a server with authentication challenges. Review URL: http://codereview.chromium.org/555174 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@38227 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/http/http_auth_sspi_win.h')
-rw-r--r--[-rwxr-xr-x]net/http/http_auth_sspi_win.h30
1 files changed, 14 insertions, 16 deletions
diff --git a/net/http/http_auth_sspi_win.h b/net/http/http_auth_sspi_win.h
index 4d340aa..b94ffbc 100755..100644
--- a/net/http/http_auth_sspi_win.h
+++ b/net/http/http_auth_sspi_win.h
@@ -35,17 +35,22 @@ class HttpAuthSSPI {
bool ParseChallenge(std::string::const_iterator challenge_begin,
std::string::const_iterator challenge_end);
- int GenerateCredentials(const std::wstring& username,
- const std::wstring& password,
- const GURL& origin,
- const HttpRequestInfo* request,
- const ProxyInfo* proxy,
- std::string* out_credentials);
+ // Generates an authentication token.
+ // The return value is an error code. If it's not |OK|, the value of
+ // |*auth_token| is unspecified.
+ // If this is the first round of a multiple round scheme, credentials are
+ // obtained using |*username| and |*password|. If |username| and |password|
+ // are NULL, the default credentials are used instead.
+ int GenerateAuthToken(const std::wstring* username,
+ const std::wstring* password,
+ const GURL& origin,
+ const HttpRequestInfo* request,
+ const ProxyInfo* proxy,
+ std::string* auth_token);
private:
- int OnFirstRound(const std::wstring& domain,
- const std::wstring& user,
- const std::wstring& password);
+ int OnFirstRound(const std::wstring* username,
+ const std::wstring* password);
int GetNextSecurityToken(
const GURL& origin,
@@ -80,13 +85,6 @@ void SplitDomainAndUser(const std::wstring& combined,
int DetermineMaxTokenLength(const std::wstring& package,
ULONG* max_token_length);
-// Acquire credentials for a user.
-int AcquireCredentials(const SEC_WCHAR* package,
- const std::wstring& domain,
- const std::wstring& user,
- const std::wstring& password,
- CredHandle* cred);
-
} // namespace net
#endif // NET_HTTP_HTTP_AUTH_SSPI_WIN_H_