summaryrefslogtreecommitdiffstats
path: root/net/base/auth.h
diff options
context:
space:
mode:
authorcbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-03 22:16:36 +0000
committercbentzel@chromium.org <cbentzel@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-10-03 22:16:36 +0000
commitc2911d7cb75ff0e8a1804452af18b303d8d77725 (patch)
treec959b2efdac32a7d5ff7f1acc2080ddd92727e73 /net/base/auth.h
parent64ffa044742115f8b41abe5af6e7119aeb25c32e (diff)
downloadchromium_src-c2911d7cb75ff0e8a1804452af18b303d8d77725.zip
chromium_src-c2911d7cb75ff0e8a1804452af18b303d8d77725.tar.gz
chromium_src-c2911d7cb75ff0e8a1804452af18b303d8d77725.tar.bz2
NetworkDelegate::OnAuthRequired can set or cancel auth, in addition to taking no action.
BUG=32056 TEST=net_unittests Review URL: http://codereview.chromium.org/8100001 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@103801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'net/base/auth.h')
-rw-r--r--net/base/auth.h23
1 files changed, 21 insertions, 2 deletions
diff --git a/net/base/auth.h b/net/base/auth.h
index 51f8db9..386adad 100644
--- a/net/base/auth.h
+++ b/net/base/auth.h
@@ -43,6 +43,26 @@ class NET_EXPORT AuthChallengeInfo :
~AuthChallengeInfo();
};
+// Authentication Credentials for an authentication credentials.
+class NET_EXPORT AuthCredentials {
+ public:
+ AuthCredentials();
+ ~AuthCredentials();
+
+ // The username to provide, possibly empty. This should be ASCII only to
+ // minimize compatibility problems, but arbitrary UTF-16 strings are allowed
+ // and will be attempted.
+ string16 username;
+
+ // The password to provide, possibly empty. This should be ASCII only to
+ // minimize compatibility problems, but arbitrary UTF-16 strings are allowed
+ // and will be attempted.
+ string16 password;
+
+ // Intentionally allowing the implicit copy constructor and assignment
+ // operators.
+};
+
// Authentication structures
enum AuthState {
AUTH_STATE_DONT_NEED_AUTH,
@@ -54,8 +74,7 @@ enum AuthState {
class AuthData : public base::RefCountedThreadSafe<AuthData> {
public:
AuthState state; // whether we need, have, or gave up on authentication.
- string16 username; // the username supplied to us for auth.
- string16 password; // the password supplied to us for auth.
+ AuthCredentials credentials; // The credentials to use for auth.
// We wouldn't instantiate this class if we didn't need authentication.
AuthData();