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