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

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

Issue 8774031: Multi-step authentication support in JingleSession. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: - Created 9 years 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | remoting/protocol/authenticator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_AUTHENTICATOR_H_ 5 #ifndef REMOTING_PROTOCOL_AUTHENTICATOR_H_
6 #define REMOTING_PROTOCOL_AUTHENTICATOR_H_ 6 #define REMOTING_PROTOCOL_AUTHENTICATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 namespace buzz { 10 namespace buzz {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 // Next message is ready to be sent to the peer. 46 // Next message is ready to be sent to the peer.
47 MESSAGE_READY, 47 MESSAGE_READY,
48 48
49 // Session is authenticated successufully. 49 // Session is authenticated successufully.
50 ACCEPTED, 50 ACCEPTED,
51 51
52 // Session is rejected. 52 // Session is rejected.
53 REJECTED, 53 REJECTED,
54 }; 54 };
55 55
56 // Returns true if |message| is an Authenticator message.
57 static bool IsAuthenticatorMessage(const buzz::XmlElement* message);
58
59 // Creates an empty Authenticator message, owned by the caller.
60 static buzz::XmlElement* CreateEmptyAuthenticatorMessage();
61
62 // Finds Authenticator message among child elements of |message|, or
63 // returns NULL otherwise.
64 static const buzz::XmlElement* FindAuthenticatorMessage(
65 const buzz::XmlElement* message);
66
56 Authenticator() {} 67 Authenticator() {}
57 virtual ~Authenticator() {} 68 virtual ~Authenticator() {}
58 69
59 // Returns current state of the authenticator. 70 // Returns current state of the authenticator.
60 virtual State state() const = 0; 71 virtual State state() const = 0;
61 72
62 // Called in response to incoming message received from the peer. 73 // Called in response to incoming message received from the peer.
63 // Should only be called when in WAITING_MESSAGE state. Caller 74 // Should only be called when in WAITING_MESSAGE state. Caller
64 // retains ownership of |message|. 75 // retains ownership of |message|.
65 virtual void ProcessMessage(const buzz::XmlElement* message) = 0; 76 virtual void ProcessMessage(const buzz::XmlElement* message) = 0;
(...skipping 24 matching lines...) Expand all
90 // for the result of this method. 101 // for the result of this method.
91 virtual Authenticator* CreateAuthenticator( 102 virtual Authenticator* CreateAuthenticator(
92 const std::string& remote_jid, 103 const std::string& remote_jid,
93 const buzz::XmlElement* first_message) = 0; 104 const buzz::XmlElement* first_message) = 0;
94 }; 105 };
95 106
96 } // namespace protocol 107 } // namespace protocol
97 } // namespace remoting 108 } // namespace remoting
98 109
99 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_H_ 110 #endif // REMOTING_PROTOCOL_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « no previous file | remoting/protocol/authenticator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698