summaryrefslogtreecommitdiffstats
path: root/net/http/http_auth_handler_negotiate.h
diff options
context:
space:
mode:
authoraberent <aberent@chromium.org>2015-07-09 07:45:53 -0700
committerCommit bot <commit-bot@chromium.org>2015-07-09 14:46:25 +0000
commitec894a5d76eadbe3cb489faed6469ff78e00aec8 (patch)
treef5b0639517f3ede625e9d3ffe2507b63a29940e1 /net/http/http_auth_handler_negotiate.h
parent7bad5e0aa9bfbb0fa979ba94a5f92cfeeecafa8f (diff)
downloadchromium_src-ec894a5d76eadbe3cb489faed6469ff78e00aec8.zip
chromium_src-ec894a5d76eadbe3cb489faed6469ff78e00aec8.tar.gz
chromium_src-ec894a5d76eadbe3cb489faed6469ff78e00aec8.tar.bz2
Support Kerberos on Android
As part of this, allow asynchronous token return. This should be allowed anyway, but is particularly important on Android, where getting a token may cause user interaction. BUG=474943 Review URL: https://codereview.chromium.org/1128043007 Cr-Commit-Position: refs/heads/master@{#338039}
Diffstat (limited to 'net/http/http_auth_handler_negotiate.h')
-rw-r--r--net/http/http_auth_handler_negotiate.h17
1 files changed, 12 insertions, 5 deletions
diff --git a/net/http/http_auth_handler_negotiate.h b/net/http/http_auth_handler_negotiate.h
index fc596fa..d8b9d9d 100644
--- a/net/http/http_auth_handler_negotiate.h
+++ b/net/http/http_auth_handler_negotiate.h
@@ -13,7 +13,9 @@
#include "net/http/http_auth_handler.h"
#include "net/http/http_auth_handler_factory.h"
-#if defined(OS_WIN)
+#if defined(OS_ANDROID)
+#include "net/android/http_auth_negotiate_android.h"
+#elif defined(OS_WIN)
#include "net/http/http_auth_sspi_win.h"
#elif defined(OS_POSIX)
#include "net/http/http_auth_gssapi_posix.h"
@@ -32,7 +34,12 @@ class URLSecurityManager;
class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
public:
-#if defined(OS_WIN)
+#if defined(OS_ANDROID)
+ typedef net::android::HttpAuthNegotiateAndroid AuthSystem;
+ // For Android this isn't a library, but for the Android Account type, which
+ // indirectly identifies the Kerberos/SPNEGO authentication app.
+ typedef const std::string AuthLibrary;
+#elif defined(OS_WIN)
typedef SSPILibrary AuthLibrary;
typedef HttpAuthSSPI AuthSystem;
#elif defined(OS_POSIX)
@@ -65,8 +72,8 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
// Sets the system library to use, thereby assuming ownership of
// |auth_library|.
- void set_library(AuthLibrary* auth_library) {
- auth_library_.reset(auth_library);
+ void set_library(AuthLibrary* auth_provider) {
+ auth_library_.reset(auth_provider);
}
int CreateAuthHandler(HttpAuthChallengeTokenizer* challenge,
@@ -89,7 +96,7 @@ class NET_EXPORT_PRIVATE HttpAuthHandlerNegotiate : public HttpAuthHandler {
scoped_ptr<AuthLibrary> auth_library_;
};
- HttpAuthHandlerNegotiate(AuthLibrary* sspi_library,
+ HttpAuthHandlerNegotiate(AuthLibrary* auth_library,
#if defined(OS_WIN)
ULONG max_token_length,
#endif