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 #ifndef GOOGLE_APIS_GAIA_GAIA_OAUTH_CLIENT_H_ | 5 #ifndef GOOGLE_APIS_GAIA_GAIA_OAUTH_CLIENT_H_ |
6 #define GOOGLE_APIS_GAIA_GAIA_OAUTH_CLIENT_H_ | 6 #define GOOGLE_APIS_GAIA_GAIA_OAUTH_CLIENT_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 // provided access token may have any scope, and basic results will be | 121 // provided access token may have any scope, and basic results will be |
122 // returned: issued_to, audience, scope, expires_in, access_type. In | 122 // returned: issued_to, audience, scope, expires_in, access_type. In |
123 // addition, if the https://www.googleapis.com/auth/userinfo.email scope is | 123 // addition, if the https://www.googleapis.com/auth/userinfo.email scope is |
124 // present, the email and verified_email fields will be returned. If the | 124 // present, the email and verified_email fields will be returned. If the |
125 // https://www.googleapis.com/auth/userinfo.profile scope is present, the | 125 // https://www.googleapis.com/auth/userinfo.profile scope is present, the |
126 // user_id field will be returned. See |max_retries| docs above. | 126 // user_id field will be returned. See |max_retries| docs above. |
127 void GetTokenInfo(const std::string& oauth_access_token, | 127 void GetTokenInfo(const std::string& oauth_access_token, |
128 int max_retries, | 128 int max_retries, |
129 Delegate* delegate); | 129 Delegate* delegate); |
130 | 130 |
| 131 // Call the tokeninfo API for given |token_handle|, returning a dictionary of |
| 132 // response values. Basic results will be returned via |
| 133 // |OnGetTokenInfoResponse| call: audience, expires_in, user_id. See |
| 134 // |max_retries| docs above. |
| 135 void GetTokenHandleInfo(const std::string& token_handle, |
| 136 int max_retries, |
| 137 Delegate* delegate); |
| 138 |
131 private: | 139 private: |
132 // The guts of the implementation live in this class. | 140 // The guts of the implementation live in this class. |
133 class Core; | 141 class Core; |
134 scoped_refptr<Core> core_; | 142 scoped_refptr<Core> core_; |
135 DISALLOW_COPY_AND_ASSIGN(GaiaOAuthClient); | 143 DISALLOW_COPY_AND_ASSIGN(GaiaOAuthClient); |
136 }; | 144 }; |
137 } | 145 } |
138 | 146 |
139 #endif // GOOGLE_APIS_GAIA_GAIA_OAUTH_CLIENT_H_ | 147 #endif // GOOGLE_APIS_GAIA_GAIA_OAUTH_CLIENT_H_ |
OLD | NEW |