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

Unified Diff: remoting/protocol/authentication_method.h

Issue 12326090: Third Party authentication protocol. (Closed) Base URL: http://git.chromium.org/chromium/src.git@host_key_pair
Patch Set: TokenFetcher/Validator ownership, move parameters to Validator, remove client/host glue Created 7 years, 10 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 side-by-side diff with in-line comments
Download patch
Index: remoting/protocol/authentication_method.h
diff --git a/remoting/protocol/authentication_method.h b/remoting/protocol/authentication_method.h
index 95a27e07a10c48e646640ca089d0e215e4ae1c9f..ed11c4e802db34154acf6593e0bedf3cfb9c7331 100644
--- a/remoting/protocol/authentication_method.h
+++ b/remoting/protocol/authentication_method.h
@@ -29,6 +29,7 @@ class AuthenticationMethod {
// Constructors for various authentication methods.
static AuthenticationMethod Invalid();
static AuthenticationMethod Spake2(HashFunction hash_function);
+ static AuthenticationMethod ThirdParty();
// Parses a string that defines an authentication method. Returns an
// invalid value if the string is invalid.
@@ -43,6 +44,9 @@ class AuthenticationMethod {
// Returns true
bool is_valid() const { return !invalid_; }
+ // Returns true
+ bool requires_token() const { return requires_token_; }
+
// Following methods are valid only when is_valid() returns true.
// Hash function applied to the shared secret on both ends.
@@ -58,11 +62,13 @@ class AuthenticationMethod {
return !(*this == other);
}
- private:
+ protected:
AuthenticationMethod();
- explicit AuthenticationMethod(HashFunction hash_function);
+ explicit AuthenticationMethod(HashFunction hash_function,
+ bool requires_token);
bool invalid_;
+ bool requires_token_;
HashFunction hash_function_;
};
« no previous file with comments | « no previous file | remoting/protocol/authentication_method.cc » ('j') | remoting/protocol/authentication_method.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698