OLD | NEW |
---|---|
(Empty) | |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 #ifndef REMOTING_PROTOCOL_PIN_CLIENT_AUTHENTICATOR_H_ | |
6 #define REMOTING_PROTOCOL_PIN_CLIENT_AUTHENTICATOR_H_ | |
7 | |
8 #include "base/callback_forward.h" | |
9 #include "remoting/protocol/authentication_method.h" | |
10 #include "remoting/protocol/authenticator.h" | |
11 | |
12 namespace buzz { | |
13 class XmlElement; | |
14 } | |
15 | |
16 namespace remoting { | |
17 namespace protocol { | |
18 | |
19 class PinFetcher; | |
20 | |
21 class PinClientAuthenticator : public Authenticator { | |
Sergey Ulanov
2013/03/17 21:29:21
Please add a comment to explain what this is for.
rmsousa
2013/03/18 21:07:26
Done.
| |
22 public: | |
23 PinClientAuthenticator(AuthenticationMethod::HashFunction hash_function, | |
24 const std::string& authentication_tag, | |
25 scoped_ptr<PinFetcher> pin_fetcher, | |
26 Authenticator::State initial_state, | |
27 const base::Closure& resume_callback); | |
28 | |
29 virtual ~PinClientAuthenticator(); | |
30 | |
31 // Authenticator interface. | |
32 virtual State state() const OVERRIDE; | |
33 virtual RejectionReason rejection_reason() const OVERRIDE; | |
34 virtual void ProcessMessage(const buzz::XmlElement* message, | |
35 const base::Closure& resume_callback) OVERRIDE; | |
36 virtual scoped_ptr<buzz::XmlElement> GetNextMessage() OVERRIDE; | |
37 virtual scoped_ptr<ChannelAuthenticator> | |
38 CreateChannelAuthenticator() const OVERRIDE; | |
39 | |
40 private: | |
41 void OnPinFetched( | |
42 Authenticator::State initial_state, | |
43 const base::Closure& resume_callback, | |
44 const std::string& shared_secret); | |
45 | |
46 AuthenticationMethod::HashFunction hash_function_; | |
47 std::string authentication_tag_; | |
48 scoped_ptr<PinFetcher> pin_fetcher_; | |
49 | |
50 scoped_ptr<Authenticator> underlying_; | |
51 DISALLOW_COPY_AND_ASSIGN(PinClientAuthenticator); | |
52 }; | |
53 | |
54 } // namespace protocol | |
55 } // namespace remoting | |
56 | |
57 #endif // REMOTING_PROTOCOL_PIN_CLIENT_AUTHENTICATOR_H_ | |
OLD | NEW |