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 |
|
---|
18 | namespace Google\Service\IdentityToolkit\Resource;
|
---|
19 |
|
---|
20 | use Google\Service\IdentityToolkit\CreateAuthUriResponse;
|
---|
21 | use Google\Service\IdentityToolkit\DeleteAccountResponse;
|
---|
22 | use Google\Service\IdentityToolkit\DownloadAccountResponse;
|
---|
23 | use Google\Service\IdentityToolkit\EmailLinkSigninResponse;
|
---|
24 | use Google\Service\IdentityToolkit\GetAccountInfoResponse;
|
---|
25 | use Google\Service\IdentityToolkit\GetOobConfirmationCodeResponse;
|
---|
26 | use Google\Service\IdentityToolkit\GetRecaptchaParamResponse;
|
---|
27 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyCreateAuthUriRequest;
|
---|
28 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyDeleteAccountRequest;
|
---|
29 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyDownloadAccountRequest;
|
---|
30 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyEmailLinkSigninRequest;
|
---|
31 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyGetAccountInfoRequest;
|
---|
32 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyGetProjectConfigResponse;
|
---|
33 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyGetPublicKeysResponse;
|
---|
34 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyResetPasswordRequest;
|
---|
35 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartySendVerificationCodeRequest;
|
---|
36 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartySendVerificationCodeResponse;
|
---|
37 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartySetAccountInfoRequest;
|
---|
38 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartySetProjectConfigRequest;
|
---|
39 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartySetProjectConfigResponse;
|
---|
40 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartySignOutUserRequest;
|
---|
41 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartySignOutUserResponse;
|
---|
42 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartySignupNewUserRequest;
|
---|
43 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyUploadAccountRequest;
|
---|
44 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyVerifyAssertionRequest;
|
---|
45 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyVerifyCustomTokenRequest;
|
---|
46 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyVerifyPasswordRequest;
|
---|
47 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest;
|
---|
48 | use Google\Service\IdentityToolkit\IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse;
|
---|
49 | use Google\Service\IdentityToolkit\Relyingparty as RelyingpartyModel;
|
---|
50 | use Google\Service\IdentityToolkit\ResetPasswordResponse;
|
---|
51 | use Google\Service\IdentityToolkit\SetAccountInfoResponse;
|
---|
52 | use Google\Service\IdentityToolkit\SignupNewUserResponse;
|
---|
53 | use Google\Service\IdentityToolkit\UploadAccountResponse;
|
---|
54 | use Google\Service\IdentityToolkit\VerifyAssertionResponse;
|
---|
55 | use Google\Service\IdentityToolkit\VerifyCustomTokenResponse;
|
---|
56 | use Google\Service\IdentityToolkit\VerifyPasswordResponse;
|
---|
57 |
|
---|
58 | /**
|
---|
59 | * The "relyingparty" collection of methods.
|
---|
60 | * Typical usage is:
|
---|
61 | * <code>
|
---|
62 | * $identitytoolkitService = new Google\Service\IdentityToolkit(...);
|
---|
63 | * $relyingparty = $identitytoolkitService->relyingparty;
|
---|
64 | * </code>
|
---|
65 | */
|
---|
66 | class Relyingparty extends \Google\Service\Resource
|
---|
67 | {
|
---|
68 | /**
|
---|
69 | * Creates the URI used by the IdP to authenticate the user.
|
---|
70 | * (relyingparty.createAuthUri)
|
---|
71 | *
|
---|
72 | * @param IdentitytoolkitRelyingpartyCreateAuthUriRequest $postBody
|
---|
73 | * @param array $optParams Optional parameters.
|
---|
74 | * @return CreateAuthUriResponse
|
---|
75 | * @throws \Google\Service\Exception
|
---|
76 | */
|
---|
77 | public function createAuthUri(IdentitytoolkitRelyingpartyCreateAuthUriRequest $postBody, $optParams = [])
|
---|
78 | {
|
---|
79 | $params = ['postBody' => $postBody];
|
---|
80 | $params = array_merge($params, $optParams);
|
---|
81 | return $this->call('createAuthUri', [$params], CreateAuthUriResponse::class);
|
---|
82 | }
|
---|
83 | /**
|
---|
84 | * Delete user account. (relyingparty.deleteAccount)
|
---|
85 | *
|
---|
86 | * @param IdentitytoolkitRelyingpartyDeleteAccountRequest $postBody
|
---|
87 | * @param array $optParams Optional parameters.
|
---|
88 | * @return DeleteAccountResponse
|
---|
89 | * @throws \Google\Service\Exception
|
---|
90 | */
|
---|
91 | public function deleteAccount(IdentitytoolkitRelyingpartyDeleteAccountRequest $postBody, $optParams = [])
|
---|
92 | {
|
---|
93 | $params = ['postBody' => $postBody];
|
---|
94 | $params = array_merge($params, $optParams);
|
---|
95 | return $this->call('deleteAccount', [$params], DeleteAccountResponse::class);
|
---|
96 | }
|
---|
97 | /**
|
---|
98 | * Batch download user accounts. (relyingparty.downloadAccount)
|
---|
99 | *
|
---|
100 | * @param IdentitytoolkitRelyingpartyDownloadAccountRequest $postBody
|
---|
101 | * @param array $optParams Optional parameters.
|
---|
102 | * @return DownloadAccountResponse
|
---|
103 | * @throws \Google\Service\Exception
|
---|
104 | */
|
---|
105 | public function downloadAccount(IdentitytoolkitRelyingpartyDownloadAccountRequest $postBody, $optParams = [])
|
---|
106 | {
|
---|
107 | $params = ['postBody' => $postBody];
|
---|
108 | $params = array_merge($params, $optParams);
|
---|
109 | return $this->call('downloadAccount', [$params], DownloadAccountResponse::class);
|
---|
110 | }
|
---|
111 | /**
|
---|
112 | * Reset password for a user. (relyingparty.emailLinkSignin)
|
---|
113 | *
|
---|
114 | * @param IdentitytoolkitRelyingpartyEmailLinkSigninRequest $postBody
|
---|
115 | * @param array $optParams Optional parameters.
|
---|
116 | * @return EmailLinkSigninResponse
|
---|
117 | * @throws \Google\Service\Exception
|
---|
118 | */
|
---|
119 | public function emailLinkSignin(IdentitytoolkitRelyingpartyEmailLinkSigninRequest $postBody, $optParams = [])
|
---|
120 | {
|
---|
121 | $params = ['postBody' => $postBody];
|
---|
122 | $params = array_merge($params, $optParams);
|
---|
123 | return $this->call('emailLinkSignin', [$params], EmailLinkSigninResponse::class);
|
---|
124 | }
|
---|
125 | /**
|
---|
126 | * Returns the account info. (relyingparty.getAccountInfo)
|
---|
127 | *
|
---|
128 | * @param IdentitytoolkitRelyingpartyGetAccountInfoRequest $postBody
|
---|
129 | * @param array $optParams Optional parameters.
|
---|
130 | * @return GetAccountInfoResponse
|
---|
131 | * @throws \Google\Service\Exception
|
---|
132 | */
|
---|
133 | public function getAccountInfo(IdentitytoolkitRelyingpartyGetAccountInfoRequest $postBody, $optParams = [])
|
---|
134 | {
|
---|
135 | $params = ['postBody' => $postBody];
|
---|
136 | $params = array_merge($params, $optParams);
|
---|
137 | return $this->call('getAccountInfo', [$params], GetAccountInfoResponse::class);
|
---|
138 | }
|
---|
139 | /**
|
---|
140 | * Get a code for user action confirmation.
|
---|
141 | * (relyingparty.getOobConfirmationCode)
|
---|
142 | *
|
---|
143 | * @param RelyingpartyModel $postBody
|
---|
144 | * @param array $optParams Optional parameters.
|
---|
145 | * @return GetOobConfirmationCodeResponse
|
---|
146 | * @throws \Google\Service\Exception
|
---|
147 | */
|
---|
148 | public function getOobConfirmationCode(RelyingpartyModel $postBody, $optParams = [])
|
---|
149 | {
|
---|
150 | $params = ['postBody' => $postBody];
|
---|
151 | $params = array_merge($params, $optParams);
|
---|
152 | return $this->call('getOobConfirmationCode', [$params], GetOobConfirmationCodeResponse::class);
|
---|
153 | }
|
---|
154 | /**
|
---|
155 | * Get project configuration. (relyingparty.getProjectConfig)
|
---|
156 | *
|
---|
157 | * @param array $optParams Optional parameters.
|
---|
158 | *
|
---|
159 | * @opt_param string delegatedProjectNumber Delegated GCP project number of the
|
---|
160 | * request.
|
---|
161 | * @opt_param string projectNumber GCP project number of the request.
|
---|
162 | * @return IdentitytoolkitRelyingpartyGetProjectConfigResponse
|
---|
163 | * @throws \Google\Service\Exception
|
---|
164 | */
|
---|
165 | public function getProjectConfig($optParams = [])
|
---|
166 | {
|
---|
167 | $params = [];
|
---|
168 | $params = array_merge($params, $optParams);
|
---|
169 | return $this->call('getProjectConfig', [$params], IdentitytoolkitRelyingpartyGetProjectConfigResponse::class);
|
---|
170 | }
|
---|
171 | /**
|
---|
172 | * Get token signing public key. (relyingparty.getPublicKeys)
|
---|
173 | *
|
---|
174 | * @param array $optParams Optional parameters.
|
---|
175 | * @return IdentitytoolkitRelyingpartyGetPublicKeysResponse
|
---|
176 | * @throws \Google\Service\Exception
|
---|
177 | */
|
---|
178 | public function getPublicKeys($optParams = [])
|
---|
179 | {
|
---|
180 | $params = [];
|
---|
181 | $params = array_merge($params, $optParams);
|
---|
182 | return $this->call('getPublicKeys', [$params], IdentitytoolkitRelyingpartyGetPublicKeysResponse::class);
|
---|
183 | }
|
---|
184 | /**
|
---|
185 | * Get recaptcha secure param. (relyingparty.getRecaptchaParam)
|
---|
186 | *
|
---|
187 | * @param array $optParams Optional parameters.
|
---|
188 | * @return GetRecaptchaParamResponse
|
---|
189 | * @throws \Google\Service\Exception
|
---|
190 | */
|
---|
191 | public function getRecaptchaParam($optParams = [])
|
---|
192 | {
|
---|
193 | $params = [];
|
---|
194 | $params = array_merge($params, $optParams);
|
---|
195 | return $this->call('getRecaptchaParam', [$params], GetRecaptchaParamResponse::class);
|
---|
196 | }
|
---|
197 | /**
|
---|
198 | * Reset password for a user. (relyingparty.resetPassword)
|
---|
199 | *
|
---|
200 | * @param IdentitytoolkitRelyingpartyResetPasswordRequest $postBody
|
---|
201 | * @param array $optParams Optional parameters.
|
---|
202 | * @return ResetPasswordResponse
|
---|
203 | * @throws \Google\Service\Exception
|
---|
204 | */
|
---|
205 | public function resetPassword(IdentitytoolkitRelyingpartyResetPasswordRequest $postBody, $optParams = [])
|
---|
206 | {
|
---|
207 | $params = ['postBody' => $postBody];
|
---|
208 | $params = array_merge($params, $optParams);
|
---|
209 | return $this->call('resetPassword', [$params], ResetPasswordResponse::class);
|
---|
210 | }
|
---|
211 | /**
|
---|
212 | * Send SMS verification code. (relyingparty.sendVerificationCode)
|
---|
213 | *
|
---|
214 | * @param IdentitytoolkitRelyingpartySendVerificationCodeRequest $postBody
|
---|
215 | * @param array $optParams Optional parameters.
|
---|
216 | * @return IdentitytoolkitRelyingpartySendVerificationCodeResponse
|
---|
217 | * @throws \Google\Service\Exception
|
---|
218 | */
|
---|
219 | public function sendVerificationCode(IdentitytoolkitRelyingpartySendVerificationCodeRequest $postBody, $optParams = [])
|
---|
220 | {
|
---|
221 | $params = ['postBody' => $postBody];
|
---|
222 | $params = array_merge($params, $optParams);
|
---|
223 | return $this->call('sendVerificationCode', [$params], IdentitytoolkitRelyingpartySendVerificationCodeResponse::class);
|
---|
224 | }
|
---|
225 | /**
|
---|
226 | * Set account info for a user. (relyingparty.setAccountInfo)
|
---|
227 | *
|
---|
228 | * @param IdentitytoolkitRelyingpartySetAccountInfoRequest $postBody
|
---|
229 | * @param array $optParams Optional parameters.
|
---|
230 | * @return SetAccountInfoResponse
|
---|
231 | * @throws \Google\Service\Exception
|
---|
232 | */
|
---|
233 | public function setAccountInfo(IdentitytoolkitRelyingpartySetAccountInfoRequest $postBody, $optParams = [])
|
---|
234 | {
|
---|
235 | $params = ['postBody' => $postBody];
|
---|
236 | $params = array_merge($params, $optParams);
|
---|
237 | return $this->call('setAccountInfo', [$params], SetAccountInfoResponse::class);
|
---|
238 | }
|
---|
239 | /**
|
---|
240 | * Set project configuration. (relyingparty.setProjectConfig)
|
---|
241 | *
|
---|
242 | * @param IdentitytoolkitRelyingpartySetProjectConfigRequest $postBody
|
---|
243 | * @param array $optParams Optional parameters.
|
---|
244 | * @return IdentitytoolkitRelyingpartySetProjectConfigResponse
|
---|
245 | * @throws \Google\Service\Exception
|
---|
246 | */
|
---|
247 | public function setProjectConfig(IdentitytoolkitRelyingpartySetProjectConfigRequest $postBody, $optParams = [])
|
---|
248 | {
|
---|
249 | $params = ['postBody' => $postBody];
|
---|
250 | $params = array_merge($params, $optParams);
|
---|
251 | return $this->call('setProjectConfig', [$params], IdentitytoolkitRelyingpartySetProjectConfigResponse::class);
|
---|
252 | }
|
---|
253 | /**
|
---|
254 | * Sign out user. (relyingparty.signOutUser)
|
---|
255 | *
|
---|
256 | * @param IdentitytoolkitRelyingpartySignOutUserRequest $postBody
|
---|
257 | * @param array $optParams Optional parameters.
|
---|
258 | * @return IdentitytoolkitRelyingpartySignOutUserResponse
|
---|
259 | * @throws \Google\Service\Exception
|
---|
260 | */
|
---|
261 | public function signOutUser(IdentitytoolkitRelyingpartySignOutUserRequest $postBody, $optParams = [])
|
---|
262 | {
|
---|
263 | $params = ['postBody' => $postBody];
|
---|
264 | $params = array_merge($params, $optParams);
|
---|
265 | return $this->call('signOutUser', [$params], IdentitytoolkitRelyingpartySignOutUserResponse::class);
|
---|
266 | }
|
---|
267 | /**
|
---|
268 | * Signup new user. (relyingparty.signupNewUser)
|
---|
269 | *
|
---|
270 | * @param IdentitytoolkitRelyingpartySignupNewUserRequest $postBody
|
---|
271 | * @param array $optParams Optional parameters.
|
---|
272 | * @return SignupNewUserResponse
|
---|
273 | * @throws \Google\Service\Exception
|
---|
274 | */
|
---|
275 | public function signupNewUser(IdentitytoolkitRelyingpartySignupNewUserRequest $postBody, $optParams = [])
|
---|
276 | {
|
---|
277 | $params = ['postBody' => $postBody];
|
---|
278 | $params = array_merge($params, $optParams);
|
---|
279 | return $this->call('signupNewUser', [$params], SignupNewUserResponse::class);
|
---|
280 | }
|
---|
281 | /**
|
---|
282 | * Batch upload existing user accounts. (relyingparty.uploadAccount)
|
---|
283 | *
|
---|
284 | * @param IdentitytoolkitRelyingpartyUploadAccountRequest $postBody
|
---|
285 | * @param array $optParams Optional parameters.
|
---|
286 | * @return UploadAccountResponse
|
---|
287 | * @throws \Google\Service\Exception
|
---|
288 | */
|
---|
289 | public function uploadAccount(IdentitytoolkitRelyingpartyUploadAccountRequest $postBody, $optParams = [])
|
---|
290 | {
|
---|
291 | $params = ['postBody' => $postBody];
|
---|
292 | $params = array_merge($params, $optParams);
|
---|
293 | return $this->call('uploadAccount', [$params], UploadAccountResponse::class);
|
---|
294 | }
|
---|
295 | /**
|
---|
296 | * Verifies the assertion returned by the IdP. (relyingparty.verifyAssertion)
|
---|
297 | *
|
---|
298 | * @param IdentitytoolkitRelyingpartyVerifyAssertionRequest $postBody
|
---|
299 | * @param array $optParams Optional parameters.
|
---|
300 | * @return VerifyAssertionResponse
|
---|
301 | * @throws \Google\Service\Exception
|
---|
302 | */
|
---|
303 | public function verifyAssertion(IdentitytoolkitRelyingpartyVerifyAssertionRequest $postBody, $optParams = [])
|
---|
304 | {
|
---|
305 | $params = ['postBody' => $postBody];
|
---|
306 | $params = array_merge($params, $optParams);
|
---|
307 | return $this->call('verifyAssertion', [$params], VerifyAssertionResponse::class);
|
---|
308 | }
|
---|
309 | /**
|
---|
310 | * Verifies the developer asserted ID token. (relyingparty.verifyCustomToken)
|
---|
311 | *
|
---|
312 | * @param IdentitytoolkitRelyingpartyVerifyCustomTokenRequest $postBody
|
---|
313 | * @param array $optParams Optional parameters.
|
---|
314 | * @return VerifyCustomTokenResponse
|
---|
315 | * @throws \Google\Service\Exception
|
---|
316 | */
|
---|
317 | public function verifyCustomToken(IdentitytoolkitRelyingpartyVerifyCustomTokenRequest $postBody, $optParams = [])
|
---|
318 | {
|
---|
319 | $params = ['postBody' => $postBody];
|
---|
320 | $params = array_merge($params, $optParams);
|
---|
321 | return $this->call('verifyCustomToken', [$params], VerifyCustomTokenResponse::class);
|
---|
322 | }
|
---|
323 | /**
|
---|
324 | * Verifies the user entered password. (relyingparty.verifyPassword)
|
---|
325 | *
|
---|
326 | * @param IdentitytoolkitRelyingpartyVerifyPasswordRequest $postBody
|
---|
327 | * @param array $optParams Optional parameters.
|
---|
328 | * @return VerifyPasswordResponse
|
---|
329 | * @throws \Google\Service\Exception
|
---|
330 | */
|
---|
331 | public function verifyPassword(IdentitytoolkitRelyingpartyVerifyPasswordRequest $postBody, $optParams = [])
|
---|
332 | {
|
---|
333 | $params = ['postBody' => $postBody];
|
---|
334 | $params = array_merge($params, $optParams);
|
---|
335 | return $this->call('verifyPassword', [$params], VerifyPasswordResponse::class);
|
---|
336 | }
|
---|
337 | /**
|
---|
338 | * Verifies ownership of a phone number and creates/updates the user account
|
---|
339 | * accordingly. (relyingparty.verifyPhoneNumber)
|
---|
340 | *
|
---|
341 | * @param IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest $postBody
|
---|
342 | * @param array $optParams Optional parameters.
|
---|
343 | * @return IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse
|
---|
344 | * @throws \Google\Service\Exception
|
---|
345 | */
|
---|
346 | public function verifyPhoneNumber(IdentitytoolkitRelyingpartyVerifyPhoneNumberRequest $postBody, $optParams = [])
|
---|
347 | {
|
---|
348 | $params = ['postBody' => $postBody];
|
---|
349 | $params = array_merge($params, $optParams);
|
---|
350 | return $this->call('verifyPhoneNumber', [$params], IdentitytoolkitRelyingpartyVerifyPhoneNumberResponse::class);
|
---|
351 | }
|
---|
352 | }
|
---|
353 |
|
---|
354 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
355 | class_alias(Relyingparty::class, 'Google_Service_IdentityToolkit_Resource_Relyingparty');
|
---|