diff options
author | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-24 08:26:45 +0000 |
---|---|---|
committer | sergeyu@chromium.org <sergeyu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-01-24 08:26:45 +0000 |
commit | 5cddcf44f297adcdbaf6f59883fa19e04d3d9045 (patch) | |
tree | e3e643309c9111c83eaf17be96df9c64f1756332 /remoting/protocol/authentication_method.h | |
parent | a0323d7a8f5989b7550e600ea570b20f43465a12 (diff) | |
download | chromium_src-5cddcf44f297adcdbaf6f59883fa19e04d3d9045.zip chromium_src-5cddcf44f297adcdbaf6f59883fa19e04d3d9045.tar.gz chromium_src-5cddcf44f297adcdbaf6f59883fa19e04d3d9045.tar.bz2 |
Revert 118805 - Implement V2 authentication support in the client plugin.
Changed client plugin interface so that it receives
information needed to for V2 authentication. Also moved
authenticator creation out of ConnectionToHost.
BUG=105214
Review URL: http://codereview.chromium.org/9195004
TBR=sergeyu@chromium.org
Review URL: https://chromiumcodereview.appspot.com/9146032
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@118806 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'remoting/protocol/authentication_method.h')
-rw-r--r-- | remoting/protocol/authentication_method.h | 90 |
1 files changed, 0 insertions, 90 deletions
diff --git a/remoting/protocol/authentication_method.h b/remoting/protocol/authentication_method.h deleted file mode 100644 index 402e3bc..0000000 --- a/remoting/protocol/authentication_method.h +++ /dev/null @@ -1,90 +0,0 @@ -// Copyright (c) 2012 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -// AuthenticationMethod represents an authentication algorithm and its -// configuration. It knows how to parse and format authentication -// method names. -// Currently the following methods are supported: -// v1_token - deprecated V1 authentication mechanism, -// spake2_plain - SPAKE2 without hashing applied to the password. -// spake2_hmac - SPAKE2 with HMAC hashing of the password. - -#ifndef REMOTING_PROTOCOL_AUTHENTICATION_METHOD_H_ -#define REMOTING_PROTOCOL_AUTHENTICATION_METHOD_H_ - -#include <string> - -#include "base/memory/scoped_ptr.h" - -namespace remoting { -namespace protocol { - -class Authenticator; - -class AuthenticationMethod { - public: - enum Version { - // Legacy authentication mechanism. - // TODO(sergeyu): Should be removed when we finished switching to - // the new version (at which point this enum may be removed). - // crbug.com/110483 - VERSION_1, - - // The new SPAKE2-based authentication. - VERSION_2, - }; - - enum HashFunction { - NONE, - HMAC_SHA256, - }; - - // Constructors for various authentication methods. - static AuthenticationMethod Invalid(); - static AuthenticationMethod V1Token(); - static AuthenticationMethod Spake2(HashFunction hash_function); - - // Parses a string that defines an authentication method. Returns an - // invalid value if the string is invalid. - static AuthenticationMethod FromString(const std::string& value); - - // Returns true - bool is_valid() const { return !invalid_; } - - // Following methods are valid only when is_valid() returns true. - - // Version of the authentication protocol. - Version version() const ; - - // Hash function applied to the shared secret on both ends. - HashFunction hash_function() const; - - // Returns string representation of the value stored in this object. - const std::string ToString() const; - - // Applies the current hash function to |shared_secret| with the - // specified |tag| as a key. - std::string ApplyHashFunction(const std::string& tag, - const std::string& shared_secret); - - // Creates client authenticator using the specified parameters. - scoped_ptr<Authenticator> CreateAuthenticator( - const std::string& local_jid, - const std::string& tag, - const std::string& shared_secret); - - private: - AuthenticationMethod(); - AuthenticationMethod(Version version, - HashFunction hash_function); - - bool invalid_; - Version version_; - HashFunction hash_function_; -}; - -} // namespace protocol -} // namespace remoting - -#endif // REMOTING_PROTOCOL_AUTHENTICATION_METHOD_H_ |