Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(896)

Side by Side Diff: remoting/protocol/me2me_host_authenticator_factory.h

Issue 12313085: Host-side third party token validation (Closed) Base URL: http://git.chromium.org/chromium/src.git@third_party_auth_protocol
Patch Set: Add missing parameters Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ 5 #ifndef REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_
6 #define REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ 6 #define REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/basictypes.h" 10 #include "base/basictypes.h"
11 #include "base/compiler_specific.h" 11 #include "base/compiler_specific.h"
12 #include "base/memory/ref_counted.h" 12 #include "base/memory/ref_counted.h"
13 #include "base/memory/scoped_ptr.h" 13 #include "base/memory/scoped_ptr.h"
14 #include "remoting/protocol/authentication_method.h" 14 #include "remoting/protocol/authentication_method.h"
15 #include "remoting/protocol/authenticator.h" 15 #include "remoting/protocol/authenticator.h"
16 #include "remoting/protocol/third_party_host_authenticator.h"
16 17
17 namespace remoting { 18 namespace remoting {
18 19
19 class RsaKeyPair; 20 class RsaKeyPair;
20 21
21 namespace protocol { 22 namespace protocol {
22 23
23 class Me2MeHostAuthenticatorFactory : public AuthenticatorFactory { 24 class Me2MeHostAuthenticatorFactory : public AuthenticatorFactory {
24 public: 25 public:
25 Me2MeHostAuthenticatorFactory( 26 Me2MeHostAuthenticatorFactory(
26 const std::string& local_cert, 27 const std::string& local_cert,
27 scoped_refptr<RsaKeyPair> key_pair, 28 scoped_refptr<RsaKeyPair> key_pair,
28 const SharedSecretHash& shared_secret_hash); 29 const SharedSecretHash& shared_secret_hash,
30 const GURL& token_url,
31 const GURL& token_validation_url,
32 ThirdPartyHostAuthenticator::TokenValidatorFactory*
33 token_validator_factory);
29 virtual ~Me2MeHostAuthenticatorFactory(); 34 virtual ~Me2MeHostAuthenticatorFactory();
30 35
31 // AuthenticatorFactory interface. 36 // AuthenticatorFactory interface.
32 virtual scoped_ptr<Authenticator> CreateAuthenticator( 37 virtual scoped_ptr<Authenticator> CreateAuthenticator(
33 const std::string& local_jid, 38 const std::string& local_jid,
34 const std::string& remote_jid, 39 const std::string& remote_jid,
35 const buzz::XmlElement* first_message) OVERRIDE; 40 const buzz::XmlElement* first_message) OVERRIDE;
36 41
37 private: 42 private:
43 bool IsThirdPartyAuthenticationEnabled() const;
44
38 std::string local_jid_prefix_; 45 std::string local_jid_prefix_;
46
47 // Used for all host authenticators.
39 std::string local_cert_; 48 std::string local_cert_;
40 scoped_refptr<RsaKeyPair> key_pair_; 49 scoped_refptr<RsaKeyPair> key_pair_;
50
51 // Used only for shared secret host authenticators.
41 SharedSecretHash shared_secret_hash_; 52 SharedSecretHash shared_secret_hash_;
42 53
54 // Used only for third party host authenticators.
55 GURL token_url_;
56 GURL token_validation_url_;
57 ThirdPartyHostAuthenticator::TokenValidatorFactory* token_validator_factory_;
58
43 DISALLOW_COPY_AND_ASSIGN(Me2MeHostAuthenticatorFactory); 59 DISALLOW_COPY_AND_ASSIGN(Me2MeHostAuthenticatorFactory);
44 }; 60 };
45 61
46 } // namespace protocol 62 } // namespace protocol
47 } // namespace remoting 63 } // namespace remoting
48 64
49 #endif // REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_ 65 #endif // REMOTING_PROTOCOL_ME2ME_HOST_AUTHENTICATOR_FACTORY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698