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

Side by Side Diff: chrome/browser/chromeos/login/authenticator.h

Issue 7584026: Encrypted OAuth1 all access token and secret with system salt for now, will replace this with use... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 4 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 | Annotate | Revision Log
OLDNEW
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 CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ 5 #ifndef CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ 6 #define CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 virtual void RetryAuth(Profile* profile, 90 virtual void RetryAuth(Profile* profile,
91 const std::string& username, 91 const std::string& username,
92 const std::string& password, 92 const std::string& password,
93 const std::string& login_token, 93 const std::string& login_token,
94 const std::string& login_captcha) = 0; 94 const std::string& login_captcha) = 0;
95 95
96 // Kicks of verification of OAuth1 access token. 96 // Kicks of verification of OAuth1 access token.
97 virtual void VerifyOAuth1AccessToken(const std::string& oauth1_access_token, 97 virtual void VerifyOAuth1AccessToken(const std::string& oauth1_access_token,
98 const std::string& oauth1_secret) = 0; 98 const std::string& oauth1_secret) = 0;
99 99
100 // OAuth token encryption helpers.
101 virtual std::string EncryptToken(const std::string& token) = 0;
102 virtual std::string DecryptToken(const std::string& encrypted_token) = 0;
103
100 // Profile (usually off the record ) that was used to perform the last 104 // Profile (usually off the record ) that was used to perform the last
101 // authentication process. 105 // authentication process.
102 Profile* authentication_profile() { return authentication_profile_; } 106 Profile* authentication_profile() { return authentication_profile_; }
103 107
104 // Perform basic canonicalization of |email_address|, taking into account 108 // Perform basic canonicalization of |email_address|, taking into account
105 // that gmail does not consider '.' or caps inside a username to matter. 109 // that gmail does not consider '.' or caps inside a username to matter.
106 // It also ignores everything after a '+'. 110 // It also ignores everything after a '+'.
107 // For example, c.masone+abc@gmail.com == cMaSone@gmail.com, per 111 // For example, c.masone+abc@gmail.com == cMaSone@gmail.com, per
108 // http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=10313# 112 // http://mail.google.com/support/bin/answer.py?hl=en&ctx=mail&answer=10313#
109 static std::string Canonicalize(const std::string& email_address); 113 static std::string Canonicalize(const std::string& email_address);
110 114
111 protected: 115 protected:
112 LoginStatusConsumer* consumer_; 116 LoginStatusConsumer* consumer_;
113 Profile* authentication_profile_; 117 Profile* authentication_profile_;
114 118
115 private: 119 private:
116 DISALLOW_COPY_AND_ASSIGN(Authenticator); 120 DISALLOW_COPY_AND_ASSIGN(Authenticator);
117 }; 121 };
118 122
119 } // namespace chromeos 123 } // namespace chromeos
120 124
121 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_ 125 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_AUTHENTICATOR_H_
OLDNEW
« no previous file with comments | « chrome/browser/chromeos/login/auth_attempt_state.cc ('k') | chrome/browser/chromeos/login/google_authenticator.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698