| 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 BLIMP_NET_ENGINE_AUTHENTICATION_HANDLER_H_ | 5 #ifndef BLIMP_NET_ENGINE_AUTHENTICATION_HANDLER_H_ |
| 6 #define BLIMP_NET_ENGINE_AUTHENTICATION_HANDLER_H_ | 6 #define BLIMP_NET_ENGINE_AUTHENTICATION_HANDLER_H_ |
| 7 | 7 |
| 8 #include <memory> | 8 #include <memory> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| 11 | 11 |
| 12 #include "base/macros.h" | 12 #include "base/macros.h" |
| 13 #include "base/memory/weak_ptr.h" | 13 #include "base/memory/weak_ptr.h" |
| 14 #include "blimp/net/blimp_net_export.h" | 14 #include "blimp/net/blimp_net_export.h" |
| 15 #include "blimp/net/connection_handler.h" | 15 #include "blimp/net/connection_handler.h" |
| 16 | 16 |
| 17 namespace blimp { | 17 namespace blimp { |
| 18 | 18 |
| 19 class BlimpConnection; | 19 class BlimpConnection; |
| 20 class BlimpMessage; | |
| 21 | 20 |
| 22 // Authenticates connections and passes successfully authenticated connections | 21 // Authenticates connections and passes successfully authenticated connections |
| 23 // to |connection_handler|. | 22 // to |connection_handler|. |
| 24 class BLIMP_NET_EXPORT EngineAuthenticationHandler : public ConnectionHandler { | 23 class BLIMP_NET_EXPORT EngineAuthenticationHandler : public ConnectionHandler { |
| 25 public: | 24 public: |
| 26 // |client_auth_token|: used to authenticate incoming connection. | 25 // |client_auth_token|: used to authenticate incoming connection. |
| 27 // |connection_handler|: a new connection is passed on to it after the | 26 // |connection_handler|: a new connection is passed on to it after the |
| 28 // connection is authenticate this handler. | 27 // connection is authenticate this handler. |
| 29 EngineAuthenticationHandler(ConnectionHandler* connection_handler, | 28 EngineAuthenticationHandler(ConnectionHandler* connection_handler, |
| 30 const std::string& client_auth_token); | 29 const std::string& client_auth_token); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 41 // Used to authenticate incoming connection. Engine is assigned to one client | 40 // Used to authenticate incoming connection. Engine is assigned to one client |
| 42 // only, and all connections from that client shall carry the same token. | 41 // only, and all connections from that client shall carry the same token. |
| 43 const std::string client_auth_token_; | 42 const std::string client_auth_token_; |
| 44 | 43 |
| 45 DISALLOW_COPY_AND_ASSIGN(EngineAuthenticationHandler); | 44 DISALLOW_COPY_AND_ASSIGN(EngineAuthenticationHandler); |
| 46 }; | 45 }; |
| 47 | 46 |
| 48 } // namespace blimp | 47 } // namespace blimp |
| 49 | 48 |
| 50 #endif // BLIMP_NET_ENGINE_AUTHENTICATION_HANDLER_H_ | 49 #endif // BLIMP_NET_ENGINE_AUTHENTICATION_HANDLER_H_ |
| OLD | NEW |