IdentityToolkit.php 5.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167
  1. <?php
  2. /*
  3. * Copyright 2014 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. namespace Google\Service;
  18. use Google\Client;
  19. /**
  20. * Service definition for IdentityToolkit (v3).
  21. *
  22. * <p>
  23. * Help the third party sites to implement federated login.</p>
  24. *
  25. * <p>
  26. * For more information about this service, see the API
  27. * <a href="https://developers.google.com/identity-toolkit/v3/" target="_blank">Documentation</a>
  28. * </p>
  29. *
  30. * @author Google, Inc.
  31. */
  32. class IdentityToolkit extends \Google\Service
  33. {
  34. /** View and manage your data across Google Cloud Platform services. */
  35. const CLOUD_PLATFORM =
  36. "https://www.googleapis.com/auth/cloud-platform";
  37. /** View and administer all your Firebase data and settings. */
  38. const FIREBASE =
  39. "https://www.googleapis.com/auth/firebase";
  40. public $relyingparty;
  41. public $rootUrlTemplate;
  42. /**
  43. * Constructs the internal representation of the IdentityToolkit service.
  44. *
  45. * @param Client|array $clientOrConfig The client used to deliver requests, or a
  46. * config array to pass to a new Client instance.
  47. * @param string $rootUrl The root URL used for requests to the service.
  48. */
  49. public function __construct($clientOrConfig = [], $rootUrl = null)
  50. {
  51. parent::__construct($clientOrConfig);
  52. $this->rootUrl = $rootUrl ?: 'https://www.googleapis.com/';
  53. $this->rootUrlTemplate = $rootUrl ?: 'https://www.UNIVERSE_DOMAIN/';
  54. $this->servicePath = 'identitytoolkit/v3/relyingparty/';
  55. $this->batchPath = 'batch/identitytoolkit/v3';
  56. $this->version = 'v3';
  57. $this->serviceName = 'identitytoolkit';
  58. $this->relyingparty = new IdentityToolkit\Resource\Relyingparty(
  59. $this,
  60. $this->serviceName,
  61. 'relyingparty',
  62. [
  63. 'methods' => [
  64. 'createAuthUri' => [
  65. 'path' => 'createAuthUri',
  66. 'httpMethod' => 'POST',
  67. 'parameters' => [],
  68. ],'deleteAccount' => [
  69. 'path' => 'deleteAccount',
  70. 'httpMethod' => 'POST',
  71. 'parameters' => [],
  72. ],'downloadAccount' => [
  73. 'path' => 'downloadAccount',
  74. 'httpMethod' => 'POST',
  75. 'parameters' => [],
  76. ],'emailLinkSignin' => [
  77. 'path' => 'emailLinkSignin',
  78. 'httpMethod' => 'POST',
  79. 'parameters' => [],
  80. ],'getAccountInfo' => [
  81. 'path' => 'getAccountInfo',
  82. 'httpMethod' => 'POST',
  83. 'parameters' => [],
  84. ],'getOobConfirmationCode' => [
  85. 'path' => 'getOobConfirmationCode',
  86. 'httpMethod' => 'POST',
  87. 'parameters' => [],
  88. ],'getProjectConfig' => [
  89. 'path' => 'getProjectConfig',
  90. 'httpMethod' => 'GET',
  91. 'parameters' => [
  92. 'delegatedProjectNumber' => [
  93. 'location' => 'query',
  94. 'type' => 'string',
  95. ],
  96. 'projectNumber' => [
  97. 'location' => 'query',
  98. 'type' => 'string',
  99. ],
  100. ],
  101. ],'getPublicKeys' => [
  102. 'path' => 'publicKeys',
  103. 'httpMethod' => 'GET',
  104. 'parameters' => [],
  105. ],'getRecaptchaParam' => [
  106. 'path' => 'getRecaptchaParam',
  107. 'httpMethod' => 'GET',
  108. 'parameters' => [],
  109. ],'resetPassword' => [
  110. 'path' => 'resetPassword',
  111. 'httpMethod' => 'POST',
  112. 'parameters' => [],
  113. ],'sendVerificationCode' => [
  114. 'path' => 'sendVerificationCode',
  115. 'httpMethod' => 'POST',
  116. 'parameters' => [],
  117. ],'setAccountInfo' => [
  118. 'path' => 'setAccountInfo',
  119. 'httpMethod' => 'POST',
  120. 'parameters' => [],
  121. ],'setProjectConfig' => [
  122. 'path' => 'setProjectConfig',
  123. 'httpMethod' => 'POST',
  124. 'parameters' => [],
  125. ],'signOutUser' => [
  126. 'path' => 'signOutUser',
  127. 'httpMethod' => 'POST',
  128. 'parameters' => [],
  129. ],'signupNewUser' => [
  130. 'path' => 'signupNewUser',
  131. 'httpMethod' => 'POST',
  132. 'parameters' => [],
  133. ],'uploadAccount' => [
  134. 'path' => 'uploadAccount',
  135. 'httpMethod' => 'POST',
  136. 'parameters' => [],
  137. ],'verifyAssertion' => [
  138. 'path' => 'verifyAssertion',
  139. 'httpMethod' => 'POST',
  140. 'parameters' => [],
  141. ],'verifyCustomToken' => [
  142. 'path' => 'verifyCustomToken',
  143. 'httpMethod' => 'POST',
  144. 'parameters' => [],
  145. ],'verifyPassword' => [
  146. 'path' => 'verifyPassword',
  147. 'httpMethod' => 'POST',
  148. 'parameters' => [],
  149. ],'verifyPhoneNumber' => [
  150. 'path' => 'verifyPhoneNumber',
  151. 'httpMethod' => 'POST',
  152. 'parameters' => [],
  153. ],
  154. ]
  155. ]
  156. );
  157. }
  158. }
  159. // Adding a class alias for backwards compatibility with the previous class name.
  160. class_alias(IdentityToolkit::class, 'Google_Service_IdentityToolkit');