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

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

Issue 12518027: Protocol / client plugin changes to support interactively asking for a PIN (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: 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
(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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698