summaryrefslogtreecommitdiffstats
path: root/net/http/http_auth_sspi_win.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_sspi_win.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_sspi_win.h')
-rw-r--r--net/http/http_auth_sspi_win.h34
1 files changed, 26 insertions, 8 deletions
diff --git a/net/http/http_auth_sspi_win.h b/net/http/http_auth_sspi_win.h
index befc1bf..1d524fa 100644
--- a/net/http/http_auth_sspi_win.h
+++ b/net/http/http_auth_sspi_win.h
@@ -17,6 +17,7 @@
#include <string>
#include "base/strings/string16.h"
+#include "net/base/completion_callback.h"
#include "net/base/net_export.h"
#include "net/http/http_auth.h"
@@ -120,19 +121,36 @@ class NET_EXPORT_PRIVATE HttpAuthSSPI {
HttpAuth::AuthorizationResult ParseChallenge(
HttpAuthChallengeTokenizer* tok);
- // Generates an authentication token for the service specified by the
- // Service Principal Name |spn| and stores the value in |*auth_token|.
- // If the return value is not |OK|, then the value of |*auth_token| is
- // unspecified. ERR_IO_PENDING is not a valid return code.
+ // Generates an authentication token.
+ //
+ // The return value is an error code. The authentication token will be
+ // returned in |*auth_token|. If the result code is not |OK|, the value of
+ // |*auth_token| is unspecified.
+ //
+ // If the operation cannot be completed synchronously, |ERR_IO_PENDING| will
+ // be returned and the real result code will be passed to the completion
+ // callback. Otherwise the result code is returned immediately from this
+ // call.
+ //
+ // If the HttpAuthSPPI object is deleted before completion then the callback
+ // will not be called.
+ //
+ // If no immediate result is returned then |auth_token| must remain valid
+ // until the callback has been called.
+ //
+ // |spn| is the Service Principal Name of the server that the token is
+ // being generated for.
+ //
// If this is the first round of a multiple round scheme, credentials are
- // obtained using |*credentials|. If |credentials| is NULL, the credentials
- // for the currently logged in user are used instead.
+ // obtained using |*credentials|. If |credentials| is NULL, the default
+ // credentials are used instead.
int GenerateAuthToken(const AuthCredentials* credentials,
const std::string& spn,
- std::string* auth_token);
+ std::string* auth_token,
+ const CompletionCallback& callback);
// Delegation is allowed on the Kerberos ticket. This allows certain servers
- // to act as the user, such as an IIS server retrieiving data from a
+ // to act as the user, such as an IIS server retrieving data from a
// Kerberized MSSQL server.
void Delegate();