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

Side by Side Diff: webrtc/libjingle/xmpp/xmppauth.h

Issue 2617443003: Remove webrtc/libjingle/{xmllite,xmpp} (Closed)
Patch Set: Created 3 years, 11 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
« no previous file with comments | « webrtc/libjingle/xmpp/util_unittest.cc ('k') | webrtc/libjingle/xmpp/xmppauth.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 /*
2 * Copyright 2004 The WebRTC Project Authors. All rights reserved.
3 *
4 * Use of this source code is governed by a BSD-style license
5 * that can be found in the LICENSE file in the root of the source
6 * tree. An additional intellectual property rights grant can be found
7 * in the file PATENTS. All contributing project authors may
8 * be found in the AUTHORS file in the root of the source tree.
9 */
10
11 #ifndef WEBRTC_LIBJINGLE_XMPP_XMPPAUTH_H_
12 #define WEBRTC_LIBJINGLE_XMPP_XMPPAUTH_H_
13
14 #include <vector>
15
16 #include "webrtc/libjingle/xmpp/jid.h"
17 #include "webrtc/libjingle/xmpp/prexmppauth.h"
18 #include "webrtc/libjingle/xmpp/saslhandler.h"
19 #include "webrtc/base/cryptstring.h"
20 #include "webrtc/base/sigslot.h"
21
22 class XmppAuth: public buzz::PreXmppAuth {
23 public:
24 XmppAuth();
25 virtual ~XmppAuth();
26
27 // TODO: Just have one "secret" that is either pass or
28 // token?
29 virtual void StartPreXmppAuth(const buzz::Jid& jid,
30 const rtc::SocketAddress& server,
31 const rtc::CryptString& pass,
32 const std::string& auth_mechanism,
33 const std::string& auth_token);
34
35 virtual bool IsAuthDone() const { return done_; }
36 virtual bool IsAuthorized() const { return true; }
37 virtual bool HadError() const { return false; }
38 virtual int GetError() const { return 0; }
39 virtual buzz::CaptchaChallenge GetCaptchaChallenge() const {
40 return buzz::CaptchaChallenge();
41 }
42 virtual std::string GetAuthMechanism() const { return auth_mechanism_; }
43 virtual std::string GetAuthToken() const { return auth_token_; }
44
45 virtual std::string ChooseBestSaslMechanism(
46 const std::vector<std::string>& mechanisms,
47 bool encrypted);
48
49 virtual buzz::SaslMechanism * CreateSaslMechanism(
50 const std::string& mechanism);
51
52 private:
53 buzz::Jid jid_;
54 rtc::CryptString passwd_;
55 std::string auth_mechanism_;
56 std::string auth_token_;
57 bool done_;
58 };
59
60 #endif // WEBRTC_LIBJINGLE_XMPP_XMPPAUTH_H_
61
OLDNEW
« no previous file with comments | « webrtc/libjingle/xmpp/util_unittest.cc ('k') | webrtc/libjingle/xmpp/xmppauth.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698