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