OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #include "google_apis/gaia/gaia_urls.h" | 5 #include "google_apis/gaia/gaia_urls.h" |
6 | 6 |
7 #include "base/command_line.h" | 7 #include "base/command_line.h" |
8 #include "base/logging.h" | 8 #include "base/logging.h" |
9 #include "google_apis/gaia/gaia_switches.h" | 9 #include "google_apis/gaia/gaia_switches.h" |
10 #include "google_apis/google_api_keys.h" | 10 #include "google_apis/google_api_keys.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 const char kServiceLogoutUrlSuffix[] = "Logout"; | 22 const char kServiceLogoutUrlSuffix[] = "Logout"; |
23 const char kIssueAuthTokenUrlSuffix[] = "IssueAuthToken"; | 23 const char kIssueAuthTokenUrlSuffix[] = "IssueAuthToken"; |
24 const char kGetUserInfoUrlSuffix[] = "GetUserInfo"; | 24 const char kGetUserInfoUrlSuffix[] = "GetUserInfo"; |
25 const char kTokenAuthUrlSuffix[] = "TokenAuth"; | 25 const char kTokenAuthUrlSuffix[] = "TokenAuth"; |
26 const char kMergeSessionUrlSuffix[] = "MergeSession"; | 26 const char kMergeSessionUrlSuffix[] = "MergeSession"; |
27 const char kOAuthGetAccessTokenUrlSuffix[] = "OAuthGetAccessToken"; | 27 const char kOAuthGetAccessTokenUrlSuffix[] = "OAuthGetAccessToken"; |
28 const char kOAuthWrapBridgeUrlSuffix[] = "OAuthWrapBridge"; | 28 const char kOAuthWrapBridgeUrlSuffix[] = "OAuthWrapBridge"; |
29 const char kOAuth1LoginUrlSuffix[] = "OAuthLogin"; | 29 const char kOAuth1LoginUrlSuffix[] = "OAuthLogin"; |
30 const char kOAuthRevokeTokenUrlSuffix[] = "AuthSubRevokeToken"; | 30 const char kOAuthRevokeTokenUrlSuffix[] = "AuthSubRevokeToken"; |
31 const char kListAccountsSuffix[] = "ListAccounts"; | 31 const char kListAccountsSuffix[] = "ListAccounts"; |
| 32 const char kEmbeddedSigninSuffix[] = "EmbeddedSignIn"; |
32 | 33 |
33 // OAuth scopes | 34 // OAuth scopes |
34 const char kOAuth1LoginScope[] = "https://www.google.com/accounts/OAuthLogin"; | 35 const char kOAuth1LoginScope[] = "https://www.google.com/accounts/OAuthLogin"; |
35 const char kOAuthWrapBridgeUserInfoScope[] = | 36 const char kOAuthWrapBridgeUserInfoScope[] = |
36 "https://www.googleapis.com/auth/userinfo.email"; | 37 "https://www.googleapis.com/auth/userinfo.email"; |
37 | 38 |
38 // API calls from accounts.google.com (LSO) | 39 // API calls from accounts.google.com (LSO) |
39 const char kGetOAuthTokenUrlSuffix[] = "o/oauth/GetOAuthToken/"; | 40 const char kGetOAuthTokenUrlSuffix[] = "o/oauth/GetOAuthToken/"; |
40 const char kClientLoginToOAuth2UrlSuffix[] = "o/oauth2/programmatic_auth"; | 41 const char kClientLoginToOAuth2UrlSuffix[] = "o/oauth2/programmatic_auth"; |
41 const char kOAuth2AuthUrlSuffix[] = "o/oauth2/auth"; | 42 const char kOAuth2AuthUrlSuffix[] = "o/oauth2/auth"; |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
98 issue_auth_token_url_ = gaia_url_.Resolve(kIssueAuthTokenUrlSuffix); | 99 issue_auth_token_url_ = gaia_url_.Resolve(kIssueAuthTokenUrlSuffix); |
99 get_user_info_url_ = gaia_url_.Resolve(kGetUserInfoUrlSuffix); | 100 get_user_info_url_ = gaia_url_.Resolve(kGetUserInfoUrlSuffix); |
100 token_auth_url_ = gaia_url_.Resolve(kTokenAuthUrlSuffix); | 101 token_auth_url_ = gaia_url_.Resolve(kTokenAuthUrlSuffix); |
101 merge_session_url_ = gaia_url_.Resolve(kMergeSessionUrlSuffix); | 102 merge_session_url_ = gaia_url_.Resolve(kMergeSessionUrlSuffix); |
102 oauth_get_access_token_url_ = | 103 oauth_get_access_token_url_ = |
103 gaia_url_.Resolve(kOAuthGetAccessTokenUrlSuffix); | 104 gaia_url_.Resolve(kOAuthGetAccessTokenUrlSuffix); |
104 oauth_wrap_bridge_url_ = gaia_url_.Resolve(kOAuthWrapBridgeUrlSuffix); | 105 oauth_wrap_bridge_url_ = gaia_url_.Resolve(kOAuthWrapBridgeUrlSuffix); |
105 oauth_revoke_token_url_ = gaia_url_.Resolve(kOAuthRevokeTokenUrlSuffix); | 106 oauth_revoke_token_url_ = gaia_url_.Resolve(kOAuthRevokeTokenUrlSuffix); |
106 oauth1_login_url_ = gaia_url_.Resolve(kOAuth1LoginUrlSuffix); | 107 oauth1_login_url_ = gaia_url_.Resolve(kOAuth1LoginUrlSuffix); |
107 list_accounts_url_ = gaia_url_.Resolve(kListAccountsSuffix); | 108 list_accounts_url_ = gaia_url_.Resolve(kListAccountsSuffix); |
| 109 embedded_signin_url_ = gaia_url_.Resolve(kEmbeddedSigninSuffix); |
108 | 110 |
109 // URLs from accounts.google.com (LSO). | 111 // URLs from accounts.google.com (LSO). |
110 get_oauth_token_url_ = lso_origin_url_.Resolve(kGetOAuthTokenUrlSuffix); | 112 get_oauth_token_url_ = lso_origin_url_.Resolve(kGetOAuthTokenUrlSuffix); |
111 client_login_to_oauth2_url_ = | 113 client_login_to_oauth2_url_ = |
112 lso_origin_url_.Resolve(kClientLoginToOAuth2UrlSuffix); | 114 lso_origin_url_.Resolve(kClientLoginToOAuth2UrlSuffix); |
113 oauth2_auth_url_ = lso_origin_url_.Resolve(kOAuth2AuthUrlSuffix); | 115 oauth2_auth_url_ = lso_origin_url_.Resolve(kOAuth2AuthUrlSuffix); |
114 oauth2_token_url_ = lso_origin_url_.Resolve(kOAuth2TokenUrlSuffix); | 116 oauth2_token_url_ = lso_origin_url_.Resolve(kOAuth2TokenUrlSuffix); |
115 oauth2_revoke_url_ = lso_origin_url_.Resolve(kOAuth2RevokeUrlSuffix); | 117 oauth2_revoke_url_ = lso_origin_url_.Resolve(kOAuth2RevokeUrlSuffix); |
116 | 118 |
117 // URLs from www.googleapis.com. | 119 // URLs from www.googleapis.com. |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
197 } | 199 } |
198 | 200 |
199 const GURL& GaiaUrls::oauth1_login_url() const { | 201 const GURL& GaiaUrls::oauth1_login_url() const { |
200 return oauth1_login_url_; | 202 return oauth1_login_url_; |
201 } | 203 } |
202 | 204 |
203 const GURL& GaiaUrls::list_accounts_url() const { | 205 const GURL& GaiaUrls::list_accounts_url() const { |
204 return list_accounts_url_; | 206 return list_accounts_url_; |
205 } | 207 } |
206 | 208 |
| 209 const GURL& GaiaUrls::embedded_signin_url() const { |
| 210 return embedded_signin_url_; |
| 211 } |
| 212 |
207 const std::string& GaiaUrls::oauth1_login_scope() const { | 213 const std::string& GaiaUrls::oauth1_login_scope() const { |
208 return oauth1_login_scope_; | 214 return oauth1_login_scope_; |
209 } | 215 } |
210 | 216 |
211 const std::string& GaiaUrls::oauth_wrap_bridge_user_info_scope() const { | 217 const std::string& GaiaUrls::oauth_wrap_bridge_user_info_scope() const { |
212 return oauth_wrap_bridge_user_info_scope_; | 218 return oauth_wrap_bridge_user_info_scope_; |
213 } | 219 } |
214 | 220 |
215 const std::string& GaiaUrls::oauth2_chrome_client_id() const { | 221 const std::string& GaiaUrls::oauth2_chrome_client_id() const { |
216 return oauth2_chrome_client_id_; | 222 return oauth2_chrome_client_id_; |
(...skipping 23 matching lines...) Expand all Loading... |
240 return oauth2_token_info_url_; | 246 return oauth2_token_info_url_; |
241 } | 247 } |
242 | 248 |
243 const GURL& GaiaUrls::oauth2_revoke_url() const { | 249 const GURL& GaiaUrls::oauth2_revoke_url() const { |
244 return oauth2_revoke_url_; | 250 return oauth2_revoke_url_; |
245 } | 251 } |
246 | 252 |
247 const GURL& GaiaUrls::gaia_login_form_realm() const { | 253 const GURL& GaiaUrls::gaia_login_form_realm() const { |
248 return gaia_url_; | 254 return gaia_url_; |
249 } | 255 } |
OLD | NEW |