| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_THIRD_PARTY_AUTHENTICATOR_BASE_H_ | 5 #ifndef REMOTING_PROTOCOL_THIRD_PARTY_AUTHENTICATOR_BASE_H_ |
| 6 #define REMOTING_PROTOCOL_THIRD_PARTY_AUTHENTICATOR_BASE_H_ | 6 #define REMOTING_PROTOCOL_THIRD_PARTY_AUTHENTICATOR_BASE_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 18 matching lines...) Expand all Loading... |
| 29 // host. The host signs the token, then contacts the third-party server to | 29 // host. The host signs the token, then contacts the third-party server to |
| 30 // exchange the token for the shared secret. Once both client and host have the | 30 // exchange the token for the shared secret. Once both client and host have the |
| 31 // shared secret, they use an underlying |V2Authenticator| (SPAKE2) to negotiate | 31 // shared secret, they use an underlying |V2Authenticator| (SPAKE2) to negotiate |
| 32 // an authentication key, which is used to establish the connection. | 32 // an authentication key, which is used to establish the connection. |
| 33 class ThirdPartyAuthenticatorBase : public Authenticator { | 33 class ThirdPartyAuthenticatorBase : public Authenticator { |
| 34 public: | 34 public: |
| 35 virtual ~ThirdPartyAuthenticatorBase(); | 35 virtual ~ThirdPartyAuthenticatorBase(); |
| 36 | 36 |
| 37 // Authenticator interface. | 37 // Authenticator interface. |
| 38 virtual State state() const OVERRIDE; | 38 virtual State state() const OVERRIDE; |
| 39 virtual bool has_auth_started() const OVERRIDE; |
| 39 virtual RejectionReason rejection_reason() const OVERRIDE; | 40 virtual RejectionReason rejection_reason() const OVERRIDE; |
| 40 virtual void ProcessMessage(const buzz::XmlElement* message, | 41 virtual void ProcessMessage(const buzz::XmlElement* message, |
| 41 const base::Closure& resume_callback) OVERRIDE; | 42 const base::Closure& resume_callback) OVERRIDE; |
| 42 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE; | 43 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE; |
| 43 virtual scoped_ptr<ChannelAuthenticator> | 44 virtual scoped_ptr<ChannelAuthenticator> |
| 44 CreateChannelAuthenticator() const OVERRIDE; | 45 CreateChannelAuthenticator() const OVERRIDE; |
| 45 | 46 |
| 46 protected: | 47 protected: |
| 47 // XML tag names for third party authentication fields. | 48 // XML tag names for third party authentication fields. |
| 48 static const buzz::StaticQName kTokenUrlTag; | 49 static const buzz::StaticQName kTokenUrlTag; |
| (...skipping 20 matching lines...) Expand all Loading... |
| 69 RejectionReason rejection_reason_; | 70 RejectionReason rejection_reason_; |
| 70 | 71 |
| 71 private: | 72 private: |
| 72 DISALLOW_COPY_AND_ASSIGN(ThirdPartyAuthenticatorBase); | 73 DISALLOW_COPY_AND_ASSIGN(ThirdPartyAuthenticatorBase); |
| 73 }; | 74 }; |
| 74 | 75 |
| 75 } // namespace protocol | 76 } // namespace protocol |
| 76 } // namespace remoting | 77 } // namespace remoting |
| 77 | 78 |
| 78 #endif // REMOTING_PROTOCOL_THIRD_PARTY_AUTHENTICATOR_BASE_H_ | 79 #endif // REMOTING_PROTOCOL_THIRD_PARTY_AUTHENTICATOR_BASE_H_ |
| OLD | NEW |