diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 04:08:18 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-06-03 04:08:18 +0000 |
commit | 7b7a16b523c98c2bbf435716128f3682dfff64d6 (patch) | |
tree | c9648370093a3bf30910762eb40df427a3ddd64b /third_party/libjingle/files/talk/xmpp/saslplainmechanism.h | |
parent | a0c30347181cc7e5a5a6dc26b00ecd6f0caf0e97 (diff) | |
download | chromium_src-7b7a16b523c98c2bbf435716128f3682dfff64d6.zip chromium_src-7b7a16b523c98c2bbf435716128f3682dfff64d6.tar.gz chromium_src-7b7a16b523c98c2bbf435716128f3682dfff64d6.tar.bz2 |
New libjingle integrated to chrome.
BUG=none
TEST=Chrome Sync works
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=48798
Review URL: http://codereview.chromium.org/2255007
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@48811 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'third_party/libjingle/files/talk/xmpp/saslplainmechanism.h')
-rw-r--r-- | third_party/libjingle/files/talk/xmpp/saslplainmechanism.h | 65 |
1 files changed, 0 insertions, 65 deletions
diff --git a/third_party/libjingle/files/talk/xmpp/saslplainmechanism.h b/third_party/libjingle/files/talk/xmpp/saslplainmechanism.h deleted file mode 100644 index 72532e6e..0000000 --- a/third_party/libjingle/files/talk/xmpp/saslplainmechanism.h +++ /dev/null @@ -1,65 +0,0 @@ -/* - * libjingle - * Copyright 2004--2005, Google Inc. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions are met: - * - * 1. Redistributions of source code must retain the above copyright notice, - * this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright notice, - * this list of conditions and the following disclaimer in the documentation - * and/or other materials provided with the distribution. - * 3. The name of the author may not be used to endorse or promote products - * derived from this software without specific prior written permission. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED - * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO - * EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, - * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, - * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; - * OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, - * WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR - * OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF - * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - */ - -#ifndef _SASLPLAINMECHANISM_H_ -#define _SASLPLAINMECHANISM_H_ - -#include "talk/base/cryptstring.h" -#include "talk/xmpp/saslmechanism.h" - -namespace buzz { - -class SaslPlainMechanism : public SaslMechanism { - -public: - SaslPlainMechanism(const buzz::Jid user_jid, const talk_base::CryptString & password) : - user_jid_(user_jid), password_(password) {} - - virtual std::string GetMechanismName() { return "PLAIN"; } - - virtual XmlElement * StartSaslAuth() { - // send initial request - XmlElement * el = new XmlElement(QN_SASL_AUTH, true); - el->AddAttr(QN_MECHANISM, "PLAIN"); - - talk_base::FormatCryptString credential; - credential.Append("\0", 1); - credential.Append(user_jid_.node()); - credential.Append("\0", 1); - credential.Append(&password_); - el->AddText(Base64EncodeFromArray(credential.GetData(), credential.GetLength())); - return el; - } - -private: - Jid user_jid_; - talk_base::CryptString password_; -}; - -} - -#endif |