[ Index ] |
PHP Cross Reference of moodle-2.8 |
[Summary view] [Print] [Text view]
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. 23 * </p> 24 * 25 * <p> 26 * For more information about this service, see the API 27 * <a href="https://developers.google.com/accounts/docs/OAuth2" target="_blank">Documentation</a> 28 * </p> 29 * 30 * @author Google, Inc. 31 */ 32 class Google_Service_Oauth2 extends Google_Service 33 { 34 /** Know your basic profile info and list of people in your circles.. */ 35 const PLUS_LOGIN = "https://www.googleapis.com/auth/plus.login"; 36 /** Know who you are on Google. */ 37 const PLUS_ME = "https://www.googleapis.com/auth/plus.me"; 38 /** View your email address. */ 39 const USERINFO_EMAIL = "https://www.googleapis.com/auth/userinfo.email"; 40 /** View your basic profile info. */ 41 const USERINFO_PROFILE = "https://www.googleapis.com/auth/userinfo.profile"; 42 43 public $userinfo; 44 public $userinfo_v2_me; 45 private $base_methods; 46 47 /** 48 * Constructs the internal representation of the Oauth2 service. 49 * 50 * @param Google_Client $client 51 */ 52 public function __construct(Google_Client $client) 53 { 54 parent::__construct($client); 55 $this->servicePath = ''; 56 $this->version = 'v2'; 57 $this->serviceName = 'oauth2'; 58 59 $this->userinfo = new Google_Service_Oauth2_Userinfo_Resource( 60 $this, 61 $this->serviceName, 62 'userinfo', 63 array( 64 'methods' => array( 65 'get' => array( 66 'path' => 'oauth2/v2/userinfo', 67 'httpMethod' => 'GET', 68 'parameters' => array(), 69 ), 70 ) 71 ) 72 ); 73 $this->userinfo_v2_me = new Google_Service_Oauth2_UserinfoV2Me_Resource( 74 $this, 75 $this->serviceName, 76 'me', 77 array( 78 'methods' => array( 79 'get' => array( 80 'path' => 'userinfo/v2/me', 81 'httpMethod' => 'GET', 82 'parameters' => array(), 83 ), 84 ) 85 ) 86 ); 87 $this->base_methods = new Google_Service_Resource( 88 $this, 89 $this->serviceName, 90 '', 91 array( 92 'methods' => array( 93 'tokeninfo' => array( 94 'path' => 'oauth2/v2/tokeninfo', 95 'httpMethod' => 'POST', 96 'parameters' => array( 97 'access_token' => array( 98 'location' => 'query', 99 'type' => 'string', 100 ), 101 'id_token' => array( 102 'location' => 'query', 103 'type' => 'string', 104 ), 105 ), 106 ), 107 ) 108 ) 109 ); 110 } 111 /** 112 * (tokeninfo) 113 * 114 * @param array $optParams Optional parameters. 115 * 116 * @opt_param string access_token 117 * 118 * @opt_param string id_token 119 * 120 * @return Google_Service_Oauth2_Tokeninfo 121 */ 122 public function tokeninfo($optParams = array()) 123 { 124 $params = array(); 125 $params = array_merge($params, $optParams); 126 return $this->base_methods->call('tokeninfo', array($params), "Google_Service_Oauth2_Tokeninfo"); 127 } 128 } 129 130 131 /** 132 * The "userinfo" collection of methods. 133 * Typical usage is: 134 * <code> 135 * $oauth2Service = new Google_Service_Oauth2(...); 136 * $userinfo = $oauth2Service->userinfo; 137 * </code> 138 */ 139 class Google_Service_Oauth2_Userinfo_Resource extends Google_Service_Resource 140 { 141 142 /** 143 * (userinfo.get) 144 * 145 * @param array $optParams Optional parameters. 146 * @return Google_Service_Oauth2_Userinfoplus 147 */ 148 public function get($optParams = array()) 149 { 150 $params = array(); 151 $params = array_merge($params, $optParams); 152 return $this->call('get', array($params), "Google_Service_Oauth2_Userinfoplus"); 153 } 154 } 155 156 /** 157 * The "v2" collection of methods. 158 * Typical usage is: 159 * <code> 160 * $oauth2Service = new Google_Service_Oauth2(...); 161 * $v2 = $oauth2Service->v2; 162 * </code> 163 */ 164 class Google_Service_Oauth2_UserinfoV2_Resource extends Google_Service_Resource 165 { 166 167 } 168 169 /** 170 * The "me" collection of methods. 171 * Typical usage is: 172 * <code> 173 * $oauth2Service = new Google_Service_Oauth2(...); 174 * $me = $oauth2Service->me; 175 * </code> 176 */ 177 class Google_Service_Oauth2_UserinfoV2Me_Resource extends Google_Service_Resource 178 { 179 180 /** 181 * (me.get) 182 * 183 * @param array $optParams Optional parameters. 184 * @return Google_Service_Oauth2_Userinfoplus 185 */ 186 public function get($optParams = array()) 187 { 188 $params = array(); 189 $params = array_merge($params, $optParams); 190 return $this->call('get', array($params), "Google_Service_Oauth2_Userinfoplus"); 191 } 192 } 193 194 195 196 197 class Google_Service_Oauth2_Tokeninfo extends Google_Model 198 { 199 public $accessType; 200 public $audience; 201 public $email; 202 public $expiresIn; 203 public $issuedTo; 204 public $scope; 205 public $userId; 206 public $verifiedEmail; 207 208 public function setAccessType($accessType) 209 { 210 $this->accessType = $accessType; 211 } 212 213 public function getAccessType() 214 { 215 return $this->accessType; 216 } 217 218 public function setAudience($audience) 219 { 220 $this->audience = $audience; 221 } 222 223 public function getAudience() 224 { 225 return $this->audience; 226 } 227 228 public function setEmail($email) 229 { 230 $this->email = $email; 231 } 232 233 public function getEmail() 234 { 235 return $this->email; 236 } 237 238 public function setExpiresIn($expiresIn) 239 { 240 $this->expiresIn = $expiresIn; 241 } 242 243 public function getExpiresIn() 244 { 245 return $this->expiresIn; 246 } 247 248 public function setIssuedTo($issuedTo) 249 { 250 $this->issuedTo = $issuedTo; 251 } 252 253 public function getIssuedTo() 254 { 255 return $this->issuedTo; 256 } 257 258 public function setScope($scope) 259 { 260 $this->scope = $scope; 261 } 262 263 public function getScope() 264 { 265 return $this->scope; 266 } 267 268 public function setUserId($userId) 269 { 270 $this->userId = $userId; 271 } 272 273 public function getUserId() 274 { 275 return $this->userId; 276 } 277 278 public function setVerifiedEmail($verifiedEmail) 279 { 280 $this->verifiedEmail = $verifiedEmail; 281 } 282 283 public function getVerifiedEmail() 284 { 285 return $this->verifiedEmail; 286 } 287 } 288 289 class Google_Service_Oauth2_Userinfoplus extends Google_Model 290 { 291 public $email; 292 public $familyName; 293 public $gender; 294 public $givenName; 295 public $hd; 296 public $id; 297 public $link; 298 public $locale; 299 public $name; 300 public $picture; 301 public $verifiedEmail; 302 303 public function setEmail($email) 304 { 305 $this->email = $email; 306 } 307 308 public function getEmail() 309 { 310 return $this->email; 311 } 312 313 public function setFamilyName($familyName) 314 { 315 $this->familyName = $familyName; 316 } 317 318 public function getFamilyName() 319 { 320 return $this->familyName; 321 } 322 323 public function setGender($gender) 324 { 325 $this->gender = $gender; 326 } 327 328 public function getGender() 329 { 330 return $this->gender; 331 } 332 333 public function setGivenName($givenName) 334 { 335 $this->givenName = $givenName; 336 } 337 338 public function getGivenName() 339 { 340 return $this->givenName; 341 } 342 343 public function setHd($hd) 344 { 345 $this->hd = $hd; 346 } 347 348 public function getHd() 349 { 350 return $this->hd; 351 } 352 353 public function setId($id) 354 { 355 $this->id = $id; 356 } 357 358 public function getId() 359 { 360 return $this->id; 361 } 362 363 public function setLink($link) 364 { 365 $this->link = $link; 366 } 367 368 public function getLink() 369 { 370 return $this->link; 371 } 372 373 public function setLocale($locale) 374 { 375 $this->locale = $locale; 376 } 377 378 public function getLocale() 379 { 380 return $this->locale; 381 } 382 383 public function setName($name) 384 { 385 $this->name = $name; 386 } 387 388 public function getName() 389 { 390 return $this->name; 391 } 392 393 public function setPicture($picture) 394 { 395 $this->picture = $picture; 396 } 397 398 public function getPicture() 399 { 400 return $this->picture; 401 } 402 403 public function setVerifiedEmail($verifiedEmail) 404 { 405 $this->verifiedEmail = $verifiedEmail; 406 } 407 408 public function getVerifiedEmail() 409 { 410 return $this->verifiedEmail; 411 } 412 }
title
Description
Body
title
Description
Body
title
Description
Body
title
Body
Generated: Fri Nov 28 20:29:05 2014 | Cross-referenced by PHPXref 0.7.1 |