| OLD | NEW |
| 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 JINGLE_NOTIFIER_BASE_GAIA_TOKEN_PRE_XMPP_AUTH_H_ | 5 #ifndef JINGLE_NOTIFIER_BASE_GAIA_TOKEN_PRE_XMPP_AUTH_H_ |
| 6 #define JINGLE_NOTIFIER_BASE_GAIA_TOKEN_PRE_XMPP_AUTH_H_ | 6 #define JINGLE_NOTIFIER_BASE_GAIA_TOKEN_PRE_XMPP_AUTH_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 12 matching lines...) Expand all Loading... |
| 23 const std::string& auth_mechanism); | 23 const std::string& auth_mechanism); |
| 24 | 24 |
| 25 virtual ~GaiaTokenPreXmppAuth(); | 25 virtual ~GaiaTokenPreXmppAuth(); |
| 26 | 26 |
| 27 // buzz::PreXmppAuth (-buzz::SaslHandler) implementation. We stub | 27 // buzz::PreXmppAuth (-buzz::SaslHandler) implementation. We stub |
| 28 // all the methods out as we don't actually do any authentication at | 28 // all the methods out as we don't actually do any authentication at |
| 29 // this point. | 29 // this point. |
| 30 virtual void StartPreXmppAuth(const buzz::Jid& jid, | 30 virtual void StartPreXmppAuth(const buzz::Jid& jid, |
| 31 const talk_base::SocketAddress& server, | 31 const talk_base::SocketAddress& server, |
| 32 const talk_base::CryptString& pass, | 32 const talk_base::CryptString& pass, |
| 33 const std::string& auth_cookie) OVERRIDE; | 33 const std::string& auth_mechanism, |
| 34 const std::string& auth_token) OVERRIDE; |
| 34 | 35 |
| 35 virtual bool IsAuthDone() const OVERRIDE; | 36 virtual bool IsAuthDone() const OVERRIDE; |
| 36 | 37 |
| 37 virtual bool IsAuthorized() const OVERRIDE; | 38 virtual bool IsAuthorized() const OVERRIDE; |
| 38 | 39 |
| 39 virtual bool HadError() const OVERRIDE; | 40 virtual bool HadError() const OVERRIDE; |
| 40 | 41 |
| 41 virtual int GetError() const OVERRIDE; | 42 virtual int GetError() const OVERRIDE; |
| 42 | 43 |
| 43 virtual buzz::CaptchaChallenge GetCaptchaChallenge() const OVERRIDE; | 44 virtual buzz::CaptchaChallenge GetCaptchaChallenge() const OVERRIDE; |
| 44 | 45 |
| 45 virtual std::string GetAuthCookie() const OVERRIDE; | 46 virtual std::string GetAuthToken() const OVERRIDE; |
| 47 |
| 48 virtual std::string GetAuthMechanism() const OVERRIDE; |
| 46 | 49 |
| 47 // buzz::SaslHandler implementation. | 50 // buzz::SaslHandler implementation. |
| 48 | 51 |
| 49 virtual std::string ChooseBestSaslMechanism( | 52 virtual std::string ChooseBestSaslMechanism( |
| 50 const std::vector<std::string>& mechanisms, bool encrypted) OVERRIDE; | 53 const std::vector<std::string>& mechanisms, bool encrypted) OVERRIDE; |
| 51 | 54 |
| 52 virtual buzz::SaslMechanism* CreateSaslMechanism( | 55 virtual buzz::SaslMechanism* CreateSaslMechanism( |
| 53 const std::string& mechanism) OVERRIDE; | 56 const std::string& mechanism) OVERRIDE; |
| 54 | 57 |
| 55 static const char kDefaultAuthMechanism[]; | 58 static const char kDefaultAuthMechanism[]; |
| 56 | 59 |
| 57 private: | 60 private: |
| 58 std::string username_; | 61 std::string username_; |
| 59 std::string token_; | 62 std::string token_; |
| 60 std::string token_service_; | 63 std::string token_service_; |
| 61 std::string auth_mechanism_; | 64 std::string auth_mechanism_; |
| 62 }; | 65 }; |
| 63 | 66 |
| 64 } // namespace notifier | 67 } // namespace notifier |
| 65 | 68 |
| 66 #endif // JINGLE_NOTIFIER_BASE_GAIA_TOKEN_PRE_XMPP_AUTH_H_ | 69 #endif // JINGLE_NOTIFIER_BASE_GAIA_TOKEN_PRE_XMPP_AUTH_H_ |
| OLD | NEW |