OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_TOKEN_VALIDATOR_H_ | 5 #ifndef REMOTING_PROTOCOL_TOKEN_VALIDATOR_H_ |
6 #define REMOTING_PROTOCOL_TOKEN_VALIDATOR_H_ | 6 #define REMOTING_PROTOCOL_TOKEN_VALIDATOR_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 #include <string> | 9 #include <string> |
10 | 10 |
11 #include "base/callback.h" | 11 #include "base/callback.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "url/gurl.h" | 13 #include "url/gurl.h" |
14 | 14 |
15 namespace remoting { | 15 namespace remoting { |
16 | 16 |
17 class RsaKeyPair; | |
18 | |
19 namespace protocol { | 17 namespace protocol { |
20 | 18 |
21 // The |TokenValidator| encapsulates the parameters to be sent to the client | 19 // The |TokenValidator| encapsulates the parameters to be sent to the client |
22 // to obtain a token, and the method to validate that token and obtain the | 20 // to obtain a token, and the method to validate that token and obtain the |
23 // shared secret for the connection. | 21 // shared secret for the connection. |
24 class TokenValidator { | 22 class TokenValidator { |
25 public: | 23 public: |
26 // Callback passed to |ValidateThirdPartyToken|, and called once the host | 24 // Callback passed to |ValidateThirdPartyToken|, and called once the host |
27 // authentication finishes. |shared_secret| should be used by the host to | 25 // authentication finishes. |shared_secret| should be used by the host to |
28 // create a V2Authenticator. In case of failure, the callback is called with | 26 // create a V2Authenticator. In case of failure, the callback is called with |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
61 protected: | 59 protected: |
62 friend class base::RefCountedThreadSafe<TokenValidatorFactory>; | 60 friend class base::RefCountedThreadSafe<TokenValidatorFactory>; |
63 | 61 |
64 virtual ~TokenValidatorFactory() {} | 62 virtual ~TokenValidatorFactory() {} |
65 }; | 63 }; |
66 | 64 |
67 } // namespace protocol | 65 } // namespace protocol |
68 } // namespace remoting | 66 } // namespace remoting |
69 | 67 |
70 #endif // REMOTING_PROTOCOL_TOKEN_VALIDATOR_H_ | 68 #endif // REMOTING_PROTOCOL_TOKEN_VALIDATOR_H_ |
OLD | NEW |