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