PluginProbe
UpdraftPlus: WP Backup & Migration Plugin / 1.16.5
UpdraftPlus: WP Backup & Migration Plugin v1.16.5
1.26.7 1.26.6 1.26.5 1.26.4 1.26.3 1.9.19 1.9.25 1.9.26 1.9.30 1.9.31 1.9.32 1.9.4 1.9.40 1.9.41 1.9.42 1.9.43 1.9.44 1.9.45 1.9.46 1.9.5 1.9.50 1.9.51 1.9.60 1.9.62 1.9.63 All 371 releases
updraftplus / includes / Google / Service / Oauth2.php

Oauth2.php in UpdraftPlus: WP Backup & Migration Plugin 1.16.5, at includes/Google/Service/Oauth2.php

503 lines 10.7 KB
No matching file
Up and down to move Enter to open Esc to close
Raw Download Zip
1 <?php
2 /*
3 * Copyright 2010 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18 /**
19 * Service definition for Oauth2 (v2).
20 *
21 * <p>
22 * Lets you access OAuth2 protocol related APIs.</p>
23 *
24 * <p>
25 * For more information about this service, see the API
26 * <a href="https://developers.google.com/accounts/docs/OAuth2" target="_blank">Documentation</a>
27 * </p>
28 *
29 * @author Google, Inc.
30 */
31 class Google_Service_Oauth2 extends Google_Service
32 {
33 /** Know your basic profile info and list of people in your circles.. */
34 const PLUS_LOGIN =
35 "https://www.googleapis.com/auth/plus.login";
36 /** Know who you are on Google. */
37 const PLUS_ME =
38 "https://www.googleapis.com/auth/plus.me";
39 /** View your email address. */
40 const USERINFO_EMAIL =
41 "https://www.googleapis.com/auth/userinfo.email";
42 /** View your basic profile info. */
43 const USERINFO_PROFILE =
44 "https://www.googleapis.com/auth/userinfo.profile";
45
46 public $userinfo;
47 public $userinfo_v2_me;
48 private $base_methods;
49
50 /**
51 * Constructs the internal representation of the Oauth2 service.
52 *
53 * @param Google_Client $client
54 */
55 public function __construct(Google_Client $client)
56 {
57 parent::__construct($client);
58 $this->servicePath = '';
59 $this->version = 'v2';
60 $this->serviceName = 'oauth2';
61
62 $this->userinfo = new Google_Service_Oauth2_Userinfo_Resource(
63 $this,
64 $this->serviceName,
65 'userinfo',
66 array(
67 'methods' => array(
68 'get' => array(
69 'path' => 'oauth2/v2/userinfo',
70 'httpMethod' => 'GET',
71 'parameters' => array(),
72 ),
73 )
74 )
75 );
76 $this->userinfo_v2_me = new Google_Service_Oauth2_UserinfoV2Me_Resource(
77 $this,
78 $this->serviceName,
79 'me',
80 array(
81 'methods' => array(
82 'get' => array(
83 'path' => 'userinfo/v2/me',
84 'httpMethod' => 'GET',
85 'parameters' => array(),
86 ),
87 )
88 )
89 );
90 $this->base_methods = new Google_Service_Resource(
91 $this,
92 $this->serviceName,
93 '',
94 array(
95 'methods' => array(
96 'getCertForOpenIdConnect' => array(
97 'path' => 'oauth2/v2/certs',
98 'httpMethod' => 'GET',
99 'parameters' => array(),
100 ),'tokeninfo' => array(
101 'path' => 'oauth2/v2/tokeninfo',
102 'httpMethod' => 'POST',
103 'parameters' => array(
104 'access_token' => array(
105 'location' => 'query',
106 'type' => 'string',
107 ),
108 'id_token' => array(
109 'location' => 'query',
110 'type' => 'string',
111 ),
112 'token_handle' => array(
113 'location' => 'query',
114 'type' => 'string',
115 ),
116 ),
117 ),
118 )
119 )
120 );
121 }
122 /**
123 * (getCertForOpenIdConnect)
124 *
125 * @param array $optParams Optional parameters.
126 * @return Google_Service_Oauth2_Jwk
127 */
128 public function getCertForOpenIdConnect($optParams = array())
129 {
130 $params = array();
131 $params = array_merge($params, $optParams);
132 return $this->base_methods->call('getCertForOpenIdConnect', array($params), "Google_Service_Oauth2_Jwk");
133 }
134 /**
135 * (tokeninfo)
136 *
137 * @param array $optParams Optional parameters.
138 *
139 * @opt_param string access_token
140 * @opt_param string id_token
141 * @opt_param string token_handle
142 * @return Google_Service_Oauth2_Tokeninfo
143 */
144 public function tokeninfo($optParams = array())
145 {
146 $params = array();
147 $params = array_merge($params, $optParams);
148 return $this->base_methods->call('tokeninfo', array($params), "Google_Service_Oauth2_Tokeninfo");
149 }
150 }
151
152
153 /**
154 * The "userinfo" collection of methods.
155 * Typical usage is:
156 * <code>
157 * $oauth2Service = new Google_Service_Oauth2(...);
158 * $userinfo = $oauth2Service->userinfo;
159 * </code>
160 */
161 class Google_Service_Oauth2_Userinfo_Resource extends Google_Service_Resource
162 {
163
164 /**
165 * (userinfo.get)
166 *
167 * @param array $optParams Optional parameters.
168 * @return Google_Service_Oauth2_Userinfoplus
169 */
170 public function get($optParams = array())
171 {
172 $params = array();
173 $params = array_merge($params, $optParams);
174 return $this->call('get', array($params), "Google_Service_Oauth2_Userinfoplus");
175 }
176 }
177
178 /**
179 * The "v2" collection of methods.
180 * Typical usage is:
181 * <code>
182 * $oauth2Service = new Google_Service_Oauth2(...);
183 * $v2 = $oauth2Service->v2;
184 * </code>
185 */
186 class Google_Service_Oauth2_UserinfoV2_Resource extends Google_Service_Resource
187 {
188 }
189
190 /**
191 * The "me" collection of methods.
192 * Typical usage is:
193 * <code>
194 * $oauth2Service = new Google_Service_Oauth2(...);
195 * $me = $oauth2Service->me;
196 * </code>
197 */
198 class Google_Service_Oauth2_UserinfoV2Me_Resource extends Google_Service_Resource
199 {
200
201 /**
202 * (me.get)
203 *
204 * @param array $optParams Optional parameters.
205 * @return Google_Service_Oauth2_Userinfoplus
206 */
207 public function get($optParams = array())
208 {
209 $params = array();
210 $params = array_merge($params, $optParams);
211 return $this->call('get', array($params), "Google_Service_Oauth2_Userinfoplus");
212 }
213 }
214
215
216
217
218 class Google_Service_Oauth2_Jwk extends Google_Collection
219 {
220 protected $collection_key = 'keys';
221 protected $internal_gapi_mappings = array(
222 );
223 protected $keysType = 'Google_Service_Oauth2_JwkKeys';
224 protected $keysDataType = 'array';
225
226
227 public function setKeys($keys)
228 {
229 $this->keys = $keys;
230 }
231 public function getKeys()
232 {
233 return $this->keys;
234 }
235 }
236
237 class Google_Service_Oauth2_JwkKeys extends Google_Model
238 {
239 protected $internal_gapi_mappings = array(
240 );
241 public $alg;
242 public $e;
243 public $kid;
244 public $kty;
245 public $n;
246 public $use;
247
248
249 public function setAlg($alg)
250 {
251 $this->alg = $alg;
252 }
253 public function getAlg()
254 {
255 return $this->alg;
256 }
257 public function setE($e)
258 {
259 $this->e = $e;
260 }
261 public function getE()
262 {
263 return $this->e;
264 }
265 public function setKid($kid)
266 {
267 $this->kid = $kid;
268 }
269 public function getKid()
270 {
271 return $this->kid;
272 }
273 public function setKty($kty)
274 {
275 $this->kty = $kty;
276 }
277 public function getKty()
278 {
279 return $this->kty;
280 }
281 public function setN($n)
282 {
283 $this->n = $n;
284 }
285 public function getN()
286 {
287 return $this->n;
288 }
289 public function setUse($use)
290 {
291 $this->use = $use;
292 }
293 public function getUse()
294 {
295 return $this->use;
296 }
297 }
298
299 class Google_Service_Oauth2_Tokeninfo extends Google_Model
300 {
301 protected $internal_gapi_mappings = array(
302 "accessType" => "access_type",
303 "expiresIn" => "expires_in",
304 "issuedTo" => "issued_to",
305 "tokenHandle" => "token_handle",
306 "userId" => "user_id",
307 "verifiedEmail" => "verified_email",
308 );
309 public $accessType;
310 public $audience;
311 public $email;
312 public $expiresIn;
313 public $issuedTo;
314 public $scope;
315 public $tokenHandle;
316 public $userId;
317 public $verifiedEmail;
318
319
320 public function setAccessType($accessType)
321 {
322 $this->accessType = $accessType;
323 }
324 public function getAccessType()
325 {
326 return $this->accessType;
327 }
328 public function setAudience($audience)
329 {
330 $this->audience = $audience;
331 }
332 public function getAudience()
333 {
334 return $this->audience;
335 }
336 public function setEmail($email)
337 {
338 $this->email = $email;
339 }
340 public function getEmail()
341 {
342 return $this->email;
343 }
344 public function setExpiresIn($expiresIn)
345 {
346 $this->expiresIn = $expiresIn;
347 }
348 public function getExpiresIn()
349 {
350 return $this->expiresIn;
351 }
352 public function setIssuedTo($issuedTo)
353 {
354 $this->issuedTo = $issuedTo;
355 }
356 public function getIssuedTo()
357 {
358 return $this->issuedTo;
359 }
360 public function setScope($scope)
361 {
362 $this->scope = $scope;
363 }
364 public function getScope()
365 {
366 return $this->scope;
367 }
368 public function setTokenHandle($tokenHandle)
369 {
370 $this->tokenHandle = $tokenHandle;
371 }
372 public function getTokenHandle()
373 {
374 return $this->tokenHandle;
375 }
376 public function setUserId($userId)
377 {
378 $this->userId = $userId;
379 }
380 public function getUserId()
381 {
382 return $this->userId;
383 }
384 public function setVerifiedEmail($verifiedEmail)
385 {
386 $this->verifiedEmail = $verifiedEmail;
387 }
388 public function getVerifiedEmail()
389 {
390 return $this->verifiedEmail;
391 }
392 }
393
394 class Google_Service_Oauth2_Userinfoplus extends Google_Model
395 {
396 protected $internal_gapi_mappings = array(
397 "familyName" => "family_name",
398 "givenName" => "given_name",
399 "verifiedEmail" => "verified_email",
400 );
401 public $email;
402 public $familyName;
403 public $gender;
404 public $givenName;
405 public $hd;
406 public $id;
407 public $link;
408 public $locale;
409 public $name;
410 public $picture;
411 public $verifiedEmail;
412
413
414 public function setEmail($email)
415 {
416 $this->email = $email;
417 }
418 public function getEmail()
419 {
420 return $this->email;
421 }
422 public function setFamilyName($familyName)
423 {
424 $this->familyName = $familyName;
425 }
426 public function getFamilyName()
427 {
428 return $this->familyName;
429 }
430 public function setGender($gender)
431 {
432 $this->gender = $gender;
433 }
434 public function getGender()
435 {
436 return $this->gender;
437 }
438 public function setGivenName($givenName)
439 {
440 $this->givenName = $givenName;
441 }
442 public function getGivenName()
443 {
444 return $this->givenName;
445 }
446 public function setHd($hd)
447 {
448 $this->hd = $hd;
449 }
450 public function getHd()
451 {
452 return $this->hd;
453 }
454 public function setId($id)
455 {
456 $this->id = $id;
457 }
458 public function getId()
459 {
460 return $this->id;
461 }
462 public function setLink($link)
463 {
464 $this->link = $link;
465 }
466 public function getLink()
467 {
468 return $this->link;
469 }
470 public function setLocale($locale)
471 {
472 $this->locale = $locale;
473 }
474 public function getLocale()
475 {
476 return $this->locale;
477 }
478 public function setName($name)
479 {
480 $this->name = $name;
481 }
482 public function getName()
483 {
484 return $this->name;
485 }
486 public function setPicture($picture)
487 {
488 $this->picture = $picture;
489 }
490 public function getPicture()
491 {
492 return $this->picture;
493 }
494 public function setVerifiedEmail($verifiedEmail)
495 {
496 $this->verifiedEmail = $verifiedEmail;
497 }
498 public function getVerifiedEmail()
499 {
500 return $this->verifiedEmail;
501 }
502 }
503