OLD | NEW |
1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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_ANDROID_HTTP_AUTH_NEGOTIATE_ANDROID_H_ | 5 #ifndef NET_ANDROID_HTTP_AUTH_NEGOTIATE_ANDROID_H_ |
6 #define NET_ANDROID_HTTP_AUTH_NEGOTIATE_ANDROID_H_ | 6 #define NET_ANDROID_HTTP_AUTH_NEGOTIATE_ANDROID_H_ |
7 | 7 |
8 #include <jni.h> | 8 #include <jni.h> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 89 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
100 // until the callback has been called. | 100 // until the callback has been called. |
101 // | 101 // |
102 // |spn| is the Service Principal Name of the server that the token is | 102 // |spn| is the Service Principal Name of the server that the token is |
103 // being generated for. | 103 // being generated for. |
104 // | 104 // |
105 // If this is the first round of a multiple round scheme, credentials are | 105 // If this is the first round of a multiple round scheme, credentials are |
106 // obtained using |*credentials|. If |credentials| is NULL, the default | 106 // obtained using |*credentials|. If |credentials| is NULL, the default |
107 // credentials are used instead. | 107 // credentials are used instead. |
108 int GenerateAuthToken(const AuthCredentials* credentials, | 108 int GenerateAuthToken(const AuthCredentials* credentials, |
109 const std::string& spn, | 109 const std::string& spn, |
| 110 const std::string& channel_bindings, |
110 std::string* auth_token, | 111 std::string* auth_token, |
111 const net::CompletionCallback& callback); | 112 const net::CompletionCallback& callback); |
112 | 113 |
113 // Delegation is allowed on the Kerberos ticket. This allows certain servers | 114 // Delegation is allowed on the Kerberos ticket. This allows certain servers |
114 // to act as the user, such as an IIS server retrieving data from a | 115 // to act as the user, such as an IIS server retrieving data from a |
115 // Kerberized MSSQL server. | 116 // Kerberized MSSQL server. |
116 void Delegate(); | 117 void Delegate(); |
117 | 118 |
118 private: | 119 private: |
119 void SetResultInternal(int result, const std::string& token); | 120 void SetResultInternal(int result, const std::string& token); |
120 | 121 |
121 const HttpAuthPreferences* prefs_; | 122 const HttpAuthPreferences* prefs_; |
122 bool can_delegate_; | 123 bool can_delegate_; |
123 bool first_challenge_; | 124 bool first_challenge_; |
124 std::string server_auth_token_; | 125 std::string server_auth_token_; |
125 std::string* auth_token_; | 126 std::string* auth_token_; |
126 base::android::ScopedJavaGlobalRef<jobject> java_authenticator_; | 127 base::android::ScopedJavaGlobalRef<jobject> java_authenticator_; |
127 net::CompletionCallback completion_callback_; | 128 net::CompletionCallback completion_callback_; |
128 | 129 |
129 base::WeakPtrFactory<HttpAuthNegotiateAndroid> weak_factory_; | 130 base::WeakPtrFactory<HttpAuthNegotiateAndroid> weak_factory_; |
130 | 131 |
131 DISALLOW_COPY_AND_ASSIGN(HttpAuthNegotiateAndroid); | 132 DISALLOW_COPY_AND_ASSIGN(HttpAuthNegotiateAndroid); |
132 }; | 133 }; |
133 | 134 |
134 } // namespace android | 135 } // namespace android |
135 } // namespace net | 136 } // namespace net |
136 | 137 |
137 #endif // NET_ANDROID_HTTP_AUTH_NEGOTIATE_ANDROID_H_ | 138 #endif // NET_ANDROID_HTTP_AUTH_NEGOTIATE_ANDROID_H_ |
OLD | NEW |