Index: remoting/protocol/negotiating_authenticator.h |
diff --git a/remoting/protocol/negotiating_authenticator.h b/remoting/protocol/negotiating_authenticator.h |
index 7166cf517e15d617056b7544a50b1c495bfa0ee8..45682a478d32c7f5323ae52b5b30bf3dabb6a0b2 100644 |
--- a/remoting/protocol/negotiating_authenticator.h |
+++ b/remoting/protocol/negotiating_authenticator.h |
@@ -14,6 +14,7 @@ |
#include "base/memory/weak_ptr.h" |
#include "remoting/protocol/authenticator.h" |
#include "remoting/protocol/authentication_method.h" |
+#include "remoting/protocol/third_party_host_authenticator.h" |
namespace remoting { |
@@ -75,12 +76,21 @@ class NegotiatingAuthenticator : public Authenticator { |
const std::vector<AuthenticationMethod>& methods); |
// Creates a host authenticator, using a fixed shared secret/PIN hash. |
- static scoped_ptr<Authenticator> CreateForHost( |
+ static scoped_ptr<Authenticator> CreateForHostSharedSecret( |
const std::string& local_cert, |
scoped_refptr<RsaKeyPair> key_pair, |
const std::string& shared_secret_hash, |
AuthenticationMethod::HashFunction hash_function); |
+ // Creates a host authenticator, using third party authentication. |
+ static scoped_ptr<Authenticator> CreateForHostThirdParty( |
+ const std::string& local_cert, |
+ scoped_refptr<RsaKeyPair> key_pair, |
+ const std::string& local_jid, |
+ const std::string& remote_jid, |
rmsousa
2013/03/25 22:45:58
Yeah, passing all these parameters 3-4 callstacks
|
+ scoped_refptr<ThirdPartyHostAuthenticator::TokenValidatorFactory> |
+ token_validator_factory); |
+ |
// Authenticator interface. |
virtual State state() const OVERRIDE; |
virtual RejectionReason rejection_reason() const OVERRIDE; |
@@ -123,8 +133,16 @@ class NegotiatingAuthenticator : public Authenticator { |
// Used only for host authenticators. |
std::string local_cert_; |
scoped_refptr<RsaKeyPair> local_key_pair_; |
+ |
+ // Used only for shared secret host authenticators. |
std::string shared_secret_hash_; |
+ // Used only for third party host authenticators. |
+ std::string local_jid_; |
+ std::string remote_jid_; |
+ scoped_refptr<ThirdPartyHostAuthenticator::TokenValidatorFactory> |
+ token_validator_factory_; |
+ |
// Used only for client authenticators. |
std::string authentication_tag_; |
FetchSecretCallback fetch_secret_callback_; |