OLD | NEW |
(Empty) | |
| 1 library googleapis.identitytoolkit.v3; |
| 2 |
| 3 import "dart:core" as core; |
| 4 import "dart:collection" as collection; |
| 5 import "dart:async" as async; |
| 6 import "dart:convert" as convert; |
| 7 |
| 8 import "package:crypto/crypto.dart" as crypto; |
| 9 import 'package:http/http.dart' as http; |
| 10 import '../src/common_internal.dart' as common_internal; |
| 11 import '../common/common.dart' as common; |
| 12 |
| 13 export '../common/common.dart' show ApiRequestError; |
| 14 export '../common/common.dart' show DetailedApiRequestError; |
| 15 |
| 16 /** Help the third party sites to implement federated login. */ |
| 17 class IdentitytoolkitApi { |
| 18 |
| 19 final common_internal.ApiRequester _requester; |
| 20 |
| 21 RelyingpartyResourceApi get relyingparty => new RelyingpartyResourceApi(_reque
ster); |
| 22 |
| 23 IdentitytoolkitApi(http.Client client) : |
| 24 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/identitytoolkit/v3/relyingparty/"); |
| 25 } |
| 26 |
| 27 |
| 28 /** Not documented yet. */ |
| 29 class RelyingpartyResourceApi { |
| 30 final common_internal.ApiRequester _requester; |
| 31 |
| 32 RelyingpartyResourceApi(common_internal.ApiRequester client) : |
| 33 _requester = client; |
| 34 |
| 35 /** |
| 36 * Creates the URI used by the IdP to authenticate the user. |
| 37 * |
| 38 * [request] - The metadata request object. |
| 39 * |
| 40 * Request parameters: |
| 41 * |
| 42 * Completes with a [CreateAuthUriResponse]. |
| 43 * |
| 44 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 45 * error. |
| 46 * |
| 47 * If the used [http.Client] completes with an error when making a REST call, |
| 48 * this method will complete with the same error. |
| 49 */ |
| 50 async.Future<CreateAuthUriResponse> createAuthUri(IdentitytoolkitRelyingpartyC
reateAuthUriRequest request) { |
| 51 var _url = null; |
| 52 var _queryParams = new core.Map(); |
| 53 var _uploadMedia = null; |
| 54 var _uploadOptions = null; |
| 55 var _downloadOptions = common.DownloadOptions.Metadata; |
| 56 var _body = null; |
| 57 |
| 58 if (request != null) { |
| 59 _body = convert.JSON.encode((request).toJson()); |
| 60 } |
| 61 |
| 62 |
| 63 _url = 'createAuthUri'; |
| 64 |
| 65 var _response = _requester.request(_url, |
| 66 "POST", |
| 67 body: _body, |
| 68 queryParams: _queryParams, |
| 69 uploadOptions: _uploadOptions, |
| 70 uploadMedia: _uploadMedia, |
| 71 downloadOptions: _downloadOptions); |
| 72 return _response.then((data) => new CreateAuthUriResponse.fromJson(data)); |
| 73 } |
| 74 |
| 75 /** |
| 76 * Delete user account. |
| 77 * |
| 78 * [request] - The metadata request object. |
| 79 * |
| 80 * Request parameters: |
| 81 * |
| 82 * Completes with a [DeleteAccountResponse]. |
| 83 * |
| 84 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 85 * error. |
| 86 * |
| 87 * If the used [http.Client] completes with an error when making a REST call, |
| 88 * this method will complete with the same error. |
| 89 */ |
| 90 async.Future<DeleteAccountResponse> deleteAccount(IdentitytoolkitRelyingpartyD
eleteAccountRequest request) { |
| 91 var _url = null; |
| 92 var _queryParams = new core.Map(); |
| 93 var _uploadMedia = null; |
| 94 var _uploadOptions = null; |
| 95 var _downloadOptions = common.DownloadOptions.Metadata; |
| 96 var _body = null; |
| 97 |
| 98 if (request != null) { |
| 99 _body = convert.JSON.encode((request).toJson()); |
| 100 } |
| 101 |
| 102 |
| 103 _url = 'deleteAccount'; |
| 104 |
| 105 var _response = _requester.request(_url, |
| 106 "POST", |
| 107 body: _body, |
| 108 queryParams: _queryParams, |
| 109 uploadOptions: _uploadOptions, |
| 110 uploadMedia: _uploadMedia, |
| 111 downloadOptions: _downloadOptions); |
| 112 return _response.then((data) => new DeleteAccountResponse.fromJson(data)); |
| 113 } |
| 114 |
| 115 /** |
| 116 * Batch download user accounts. |
| 117 * |
| 118 * [request] - The metadata request object. |
| 119 * |
| 120 * Request parameters: |
| 121 * |
| 122 * Completes with a [DownloadAccountResponse]. |
| 123 * |
| 124 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 125 * error. |
| 126 * |
| 127 * If the used [http.Client] completes with an error when making a REST call, |
| 128 * this method will complete with the same error. |
| 129 */ |
| 130 async.Future<DownloadAccountResponse> downloadAccount(IdentitytoolkitRelyingpa
rtyDownloadAccountRequest request) { |
| 131 var _url = null; |
| 132 var _queryParams = new core.Map(); |
| 133 var _uploadMedia = null; |
| 134 var _uploadOptions = null; |
| 135 var _downloadOptions = common.DownloadOptions.Metadata; |
| 136 var _body = null; |
| 137 |
| 138 if (request != null) { |
| 139 _body = convert.JSON.encode((request).toJson()); |
| 140 } |
| 141 |
| 142 |
| 143 _url = 'downloadAccount'; |
| 144 |
| 145 var _response = _requester.request(_url, |
| 146 "POST", |
| 147 body: _body, |
| 148 queryParams: _queryParams, |
| 149 uploadOptions: _uploadOptions, |
| 150 uploadMedia: _uploadMedia, |
| 151 downloadOptions: _downloadOptions); |
| 152 return _response.then((data) => new DownloadAccountResponse.fromJson(data)); |
| 153 } |
| 154 |
| 155 /** |
| 156 * Returns the account info. |
| 157 * |
| 158 * [request] - The metadata request object. |
| 159 * |
| 160 * Request parameters: |
| 161 * |
| 162 * Completes with a [GetAccountInfoResponse]. |
| 163 * |
| 164 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 165 * error. |
| 166 * |
| 167 * If the used [http.Client] completes with an error when making a REST call, |
| 168 * this method will complete with the same error. |
| 169 */ |
| 170 async.Future<GetAccountInfoResponse> getAccountInfo(IdentitytoolkitRelyingpart
yGetAccountInfoRequest request) { |
| 171 var _url = null; |
| 172 var _queryParams = new core.Map(); |
| 173 var _uploadMedia = null; |
| 174 var _uploadOptions = null; |
| 175 var _downloadOptions = common.DownloadOptions.Metadata; |
| 176 var _body = null; |
| 177 |
| 178 if (request != null) { |
| 179 _body = convert.JSON.encode((request).toJson()); |
| 180 } |
| 181 |
| 182 |
| 183 _url = 'getAccountInfo'; |
| 184 |
| 185 var _response = _requester.request(_url, |
| 186 "POST", |
| 187 body: _body, |
| 188 queryParams: _queryParams, |
| 189 uploadOptions: _uploadOptions, |
| 190 uploadMedia: _uploadMedia, |
| 191 downloadOptions: _downloadOptions); |
| 192 return _response.then((data) => new GetAccountInfoResponse.fromJson(data)); |
| 193 } |
| 194 |
| 195 /** |
| 196 * Get a code for user action confirmation. |
| 197 * |
| 198 * [request] - The metadata request object. |
| 199 * |
| 200 * Request parameters: |
| 201 * |
| 202 * Completes with a [GetOobConfirmationCodeResponse]. |
| 203 * |
| 204 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 205 * error. |
| 206 * |
| 207 * If the used [http.Client] completes with an error when making a REST call, |
| 208 * this method will complete with the same error. |
| 209 */ |
| 210 async.Future<GetOobConfirmationCodeResponse> getOobConfirmationCode(Relyingpar
ty request) { |
| 211 var _url = null; |
| 212 var _queryParams = new core.Map(); |
| 213 var _uploadMedia = null; |
| 214 var _uploadOptions = null; |
| 215 var _downloadOptions = common.DownloadOptions.Metadata; |
| 216 var _body = null; |
| 217 |
| 218 if (request != null) { |
| 219 _body = convert.JSON.encode((request).toJson()); |
| 220 } |
| 221 |
| 222 |
| 223 _url = 'getOobConfirmationCode'; |
| 224 |
| 225 var _response = _requester.request(_url, |
| 226 "POST", |
| 227 body: _body, |
| 228 queryParams: _queryParams, |
| 229 uploadOptions: _uploadOptions, |
| 230 uploadMedia: _uploadMedia, |
| 231 downloadOptions: _downloadOptions); |
| 232 return _response.then((data) => new GetOobConfirmationCodeResponse.fromJson(
data)); |
| 233 } |
| 234 |
| 235 /** |
| 236 * Get token signing public key. |
| 237 * |
| 238 * Request parameters: |
| 239 * |
| 240 * Completes with a [IdentitytoolkitRelyingpartyGetPublicKeysResponse]. |
| 241 * |
| 242 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 243 * error. |
| 244 * |
| 245 * If the used [http.Client] completes with an error when making a REST call, |
| 246 * this method will complete with the same error. |
| 247 */ |
| 248 async.Future<IdentitytoolkitRelyingpartyGetPublicKeysResponse> getPublicKeys()
{ |
| 249 var _url = null; |
| 250 var _queryParams = new core.Map(); |
| 251 var _uploadMedia = null; |
| 252 var _uploadOptions = null; |
| 253 var _downloadOptions = common.DownloadOptions.Metadata; |
| 254 var _body = null; |
| 255 |
| 256 |
| 257 |
| 258 _url = 'publicKeys'; |
| 259 |
| 260 var _response = _requester.request(_url, |
| 261 "GET", |
| 262 body: _body, |
| 263 queryParams: _queryParams, |
| 264 uploadOptions: _uploadOptions, |
| 265 uploadMedia: _uploadMedia, |
| 266 downloadOptions: _downloadOptions); |
| 267 return _response.then((data) => new IdentitytoolkitRelyingpartyGetPublicKeys
Response.fromJson(data)); |
| 268 } |
| 269 |
| 270 /** |
| 271 * Set account info for a user. |
| 272 * |
| 273 * [request] - The metadata request object. |
| 274 * |
| 275 * Request parameters: |
| 276 * |
| 277 * Completes with a [ResetPasswordResponse]. |
| 278 * |
| 279 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 280 * error. |
| 281 * |
| 282 * If the used [http.Client] completes with an error when making a REST call, |
| 283 * this method will complete with the same error. |
| 284 */ |
| 285 async.Future<ResetPasswordResponse> resetPassword(IdentitytoolkitRelyingpartyR
esetPasswordRequest request) { |
| 286 var _url = null; |
| 287 var _queryParams = new core.Map(); |
| 288 var _uploadMedia = null; |
| 289 var _uploadOptions = null; |
| 290 var _downloadOptions = common.DownloadOptions.Metadata; |
| 291 var _body = null; |
| 292 |
| 293 if (request != null) { |
| 294 _body = convert.JSON.encode((request).toJson()); |
| 295 } |
| 296 |
| 297 |
| 298 _url = 'resetPassword'; |
| 299 |
| 300 var _response = _requester.request(_url, |
| 301 "POST", |
| 302 body: _body, |
| 303 queryParams: _queryParams, |
| 304 uploadOptions: _uploadOptions, |
| 305 uploadMedia: _uploadMedia, |
| 306 downloadOptions: _downloadOptions); |
| 307 return _response.then((data) => new ResetPasswordResponse.fromJson(data)); |
| 308 } |
| 309 |
| 310 /** |
| 311 * Set account info for a user. |
| 312 * |
| 313 * [request] - The metadata request object. |
| 314 * |
| 315 * Request parameters: |
| 316 * |
| 317 * Completes with a [SetAccountInfoResponse]. |
| 318 * |
| 319 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 320 * error. |
| 321 * |
| 322 * If the used [http.Client] completes with an error when making a REST call, |
| 323 * this method will complete with the same error. |
| 324 */ |
| 325 async.Future<SetAccountInfoResponse> setAccountInfo(IdentitytoolkitRelyingpart
ySetAccountInfoRequest request) { |
| 326 var _url = null; |
| 327 var _queryParams = new core.Map(); |
| 328 var _uploadMedia = null; |
| 329 var _uploadOptions = null; |
| 330 var _downloadOptions = common.DownloadOptions.Metadata; |
| 331 var _body = null; |
| 332 |
| 333 if (request != null) { |
| 334 _body = convert.JSON.encode((request).toJson()); |
| 335 } |
| 336 |
| 337 |
| 338 _url = 'setAccountInfo'; |
| 339 |
| 340 var _response = _requester.request(_url, |
| 341 "POST", |
| 342 body: _body, |
| 343 queryParams: _queryParams, |
| 344 uploadOptions: _uploadOptions, |
| 345 uploadMedia: _uploadMedia, |
| 346 downloadOptions: _downloadOptions); |
| 347 return _response.then((data) => new SetAccountInfoResponse.fromJson(data)); |
| 348 } |
| 349 |
| 350 /** |
| 351 * Batch upload existing user accounts. |
| 352 * |
| 353 * [request] - The metadata request object. |
| 354 * |
| 355 * Request parameters: |
| 356 * |
| 357 * Completes with a [UploadAccountResponse]. |
| 358 * |
| 359 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 360 * error. |
| 361 * |
| 362 * If the used [http.Client] completes with an error when making a REST call, |
| 363 * this method will complete with the same error. |
| 364 */ |
| 365 async.Future<UploadAccountResponse> uploadAccount(IdentitytoolkitRelyingpartyU
ploadAccountRequest request) { |
| 366 var _url = null; |
| 367 var _queryParams = new core.Map(); |
| 368 var _uploadMedia = null; |
| 369 var _uploadOptions = null; |
| 370 var _downloadOptions = common.DownloadOptions.Metadata; |
| 371 var _body = null; |
| 372 |
| 373 if (request != null) { |
| 374 _body = convert.JSON.encode((request).toJson()); |
| 375 } |
| 376 |
| 377 |
| 378 _url = 'uploadAccount'; |
| 379 |
| 380 var _response = _requester.request(_url, |
| 381 "POST", |
| 382 body: _body, |
| 383 queryParams: _queryParams, |
| 384 uploadOptions: _uploadOptions, |
| 385 uploadMedia: _uploadMedia, |
| 386 downloadOptions: _downloadOptions); |
| 387 return _response.then((data) => new UploadAccountResponse.fromJson(data)); |
| 388 } |
| 389 |
| 390 /** |
| 391 * Verifies the assertion returned by the IdP. |
| 392 * |
| 393 * [request] - The metadata request object. |
| 394 * |
| 395 * Request parameters: |
| 396 * |
| 397 * Completes with a [VerifyAssertionResponse]. |
| 398 * |
| 399 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 400 * error. |
| 401 * |
| 402 * If the used [http.Client] completes with an error when making a REST call, |
| 403 * this method will complete with the same error. |
| 404 */ |
| 405 async.Future<VerifyAssertionResponse> verifyAssertion(IdentitytoolkitRelyingpa
rtyVerifyAssertionRequest request) { |
| 406 var _url = null; |
| 407 var _queryParams = new core.Map(); |
| 408 var _uploadMedia = null; |
| 409 var _uploadOptions = null; |
| 410 var _downloadOptions = common.DownloadOptions.Metadata; |
| 411 var _body = null; |
| 412 |
| 413 if (request != null) { |
| 414 _body = convert.JSON.encode((request).toJson()); |
| 415 } |
| 416 |
| 417 |
| 418 _url = 'verifyAssertion'; |
| 419 |
| 420 var _response = _requester.request(_url, |
| 421 "POST", |
| 422 body: _body, |
| 423 queryParams: _queryParams, |
| 424 uploadOptions: _uploadOptions, |
| 425 uploadMedia: _uploadMedia, |
| 426 downloadOptions: _downloadOptions); |
| 427 return _response.then((data) => new VerifyAssertionResponse.fromJson(data)); |
| 428 } |
| 429 |
| 430 /** |
| 431 * Verifies the user entered password. |
| 432 * |
| 433 * [request] - The metadata request object. |
| 434 * |
| 435 * Request parameters: |
| 436 * |
| 437 * Completes with a [VerifyPasswordResponse]. |
| 438 * |
| 439 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
| 440 * error. |
| 441 * |
| 442 * If the used [http.Client] completes with an error when making a REST call, |
| 443 * this method will complete with the same error. |
| 444 */ |
| 445 async.Future<VerifyPasswordResponse> verifyPassword(IdentitytoolkitRelyingpart
yVerifyPasswordRequest request) { |
| 446 var _url = null; |
| 447 var _queryParams = new core.Map(); |
| 448 var _uploadMedia = null; |
| 449 var _uploadOptions = null; |
| 450 var _downloadOptions = common.DownloadOptions.Metadata; |
| 451 var _body = null; |
| 452 |
| 453 if (request != null) { |
| 454 _body = convert.JSON.encode((request).toJson()); |
| 455 } |
| 456 |
| 457 |
| 458 _url = 'verifyPassword'; |
| 459 |
| 460 var _response = _requester.request(_url, |
| 461 "POST", |
| 462 body: _body, |
| 463 queryParams: _queryParams, |
| 464 uploadOptions: _uploadOptions, |
| 465 uploadMedia: _uploadMedia, |
| 466 downloadOptions: _downloadOptions); |
| 467 return _response.then((data) => new VerifyPasswordResponse.fromJson(data)); |
| 468 } |
| 469 |
| 470 } |
| 471 |
| 472 |
| 473 |
| 474 /** Response of creating the IDP authentication URL. */ |
| 475 class CreateAuthUriResponse { |
| 476 /** The URI used by the IDP to authenticate the user. */ |
| 477 core.String authUri; |
| 478 |
| 479 /** True if the authUri is for user's existing provider. */ |
| 480 core.bool forExistingProvider; |
| 481 |
| 482 /** The fixed string identitytoolkit#CreateAuthUriResponse". */ |
| 483 core.String kind; |
| 484 |
| 485 /** The provider ID of the auth URI. */ |
| 486 core.String providerId; |
| 487 |
| 488 /** Whether the user is registered if the identifier is an email. */ |
| 489 core.bool registered; |
| 490 |
| 491 |
| 492 CreateAuthUriResponse(); |
| 493 |
| 494 CreateAuthUriResponse.fromJson(core.Map _json) { |
| 495 if (_json.containsKey("authUri")) { |
| 496 authUri = _json["authUri"]; |
| 497 } |
| 498 if (_json.containsKey("forExistingProvider")) { |
| 499 forExistingProvider = _json["forExistingProvider"]; |
| 500 } |
| 501 if (_json.containsKey("kind")) { |
| 502 kind = _json["kind"]; |
| 503 } |
| 504 if (_json.containsKey("providerId")) { |
| 505 providerId = _json["providerId"]; |
| 506 } |
| 507 if (_json.containsKey("registered")) { |
| 508 registered = _json["registered"]; |
| 509 } |
| 510 } |
| 511 |
| 512 core.Map toJson() { |
| 513 var _json = new core.Map(); |
| 514 if (authUri != null) { |
| 515 _json["authUri"] = authUri; |
| 516 } |
| 517 if (forExistingProvider != null) { |
| 518 _json["forExistingProvider"] = forExistingProvider; |
| 519 } |
| 520 if (kind != null) { |
| 521 _json["kind"] = kind; |
| 522 } |
| 523 if (providerId != null) { |
| 524 _json["providerId"] = providerId; |
| 525 } |
| 526 if (registered != null) { |
| 527 _json["registered"] = registered; |
| 528 } |
| 529 return _json; |
| 530 } |
| 531 } |
| 532 |
| 533 |
| 534 /** Respone of deleting account. */ |
| 535 class DeleteAccountResponse { |
| 536 /** The fixed string "identitytoolkit#DeleteAccountResponse". */ |
| 537 core.String kind; |
| 538 |
| 539 |
| 540 DeleteAccountResponse(); |
| 541 |
| 542 DeleteAccountResponse.fromJson(core.Map _json) { |
| 543 if (_json.containsKey("kind")) { |
| 544 kind = _json["kind"]; |
| 545 } |
| 546 } |
| 547 |
| 548 core.Map toJson() { |
| 549 var _json = new core.Map(); |
| 550 if (kind != null) { |
| 551 _json["kind"] = kind; |
| 552 } |
| 553 return _json; |
| 554 } |
| 555 } |
| 556 |
| 557 |
| 558 /** Respone of downloading accounts in batch. */ |
| 559 class DownloadAccountResponse { |
| 560 /** The fixed string "identitytoolkit#DownloadAccountResponse". */ |
| 561 core.String kind; |
| 562 |
| 563 /** |
| 564 * The next page token. To be used in a subsequent request to return the next |
| 565 * page of results. |
| 566 */ |
| 567 core.String nextPageToken; |
| 568 |
| 569 /** The user accounts data. */ |
| 570 core.List<UserInfo> users; |
| 571 |
| 572 |
| 573 DownloadAccountResponse(); |
| 574 |
| 575 DownloadAccountResponse.fromJson(core.Map _json) { |
| 576 if (_json.containsKey("kind")) { |
| 577 kind = _json["kind"]; |
| 578 } |
| 579 if (_json.containsKey("nextPageToken")) { |
| 580 nextPageToken = _json["nextPageToken"]; |
| 581 } |
| 582 if (_json.containsKey("users")) { |
| 583 users = _json["users"].map((value) => new UserInfo.fromJson(value)).toList
(); |
| 584 } |
| 585 } |
| 586 |
| 587 core.Map toJson() { |
| 588 var _json = new core.Map(); |
| 589 if (kind != null) { |
| 590 _json["kind"] = kind; |
| 591 } |
| 592 if (nextPageToken != null) { |
| 593 _json["nextPageToken"] = nextPageToken; |
| 594 } |
| 595 if (users != null) { |
| 596 _json["users"] = users.map((value) => (value).toJson()).toList(); |
| 597 } |
| 598 return _json; |
| 599 } |
| 600 } |
| 601 |
| 602 |
| 603 /** Response of getting account information. */ |
| 604 class GetAccountInfoResponse { |
| 605 /** The fixed string "identitytoolkit#GetAccountInfoResponse". */ |
| 606 core.String kind; |
| 607 |
| 608 /** The info of the users. */ |
| 609 core.List<UserInfo> users; |
| 610 |
| 611 |
| 612 GetAccountInfoResponse(); |
| 613 |
| 614 GetAccountInfoResponse.fromJson(core.Map _json) { |
| 615 if (_json.containsKey("kind")) { |
| 616 kind = _json["kind"]; |
| 617 } |
| 618 if (_json.containsKey("users")) { |
| 619 users = _json["users"].map((value) => new UserInfo.fromJson(value)).toList
(); |
| 620 } |
| 621 } |
| 622 |
| 623 core.Map toJson() { |
| 624 var _json = new core.Map(); |
| 625 if (kind != null) { |
| 626 _json["kind"] = kind; |
| 627 } |
| 628 if (users != null) { |
| 629 _json["users"] = users.map((value) => (value).toJson()).toList(); |
| 630 } |
| 631 return _json; |
| 632 } |
| 633 } |
| 634 |
| 635 |
| 636 /** |
| 637 * Response of getting a code for user confirmation (reset password, change |
| 638 * email etc.). |
| 639 */ |
| 640 class GetOobConfirmationCodeResponse { |
| 641 /** The fixed string "identitytoolkit#GetOobConfirmationCodeResponse". */ |
| 642 core.String kind; |
| 643 |
| 644 /** The code to be send to the user. */ |
| 645 core.String oobCode; |
| 646 |
| 647 |
| 648 GetOobConfirmationCodeResponse(); |
| 649 |
| 650 GetOobConfirmationCodeResponse.fromJson(core.Map _json) { |
| 651 if (_json.containsKey("kind")) { |
| 652 kind = _json["kind"]; |
| 653 } |
| 654 if (_json.containsKey("oobCode")) { |
| 655 oobCode = _json["oobCode"]; |
| 656 } |
| 657 } |
| 658 |
| 659 core.Map toJson() { |
| 660 var _json = new core.Map(); |
| 661 if (kind != null) { |
| 662 _json["kind"] = kind; |
| 663 } |
| 664 if (oobCode != null) { |
| 665 _json["oobCode"] = oobCode; |
| 666 } |
| 667 return _json; |
| 668 } |
| 669 } |
| 670 |
| 671 |
| 672 /** Request to get the IDP authentication URL. */ |
| 673 class IdentitytoolkitRelyingpartyCreateAuthUriRequest { |
| 674 /** |
| 675 * The app ID of the mobile app, base64(CERT_SHA1):PACKAGE_NAME for Android, |
| 676 * BUNDLE_ID for iOS. |
| 677 */ |
| 678 core.String appId; |
| 679 |
| 680 /** The relying party OAuth client ID. */ |
| 681 core.String clientId; |
| 682 |
| 683 /** |
| 684 * The opaque value used by the client to maintain context info between the |
| 685 * authentication request and the IDP callback. |
| 686 */ |
| 687 core.String context; |
| 688 |
| 689 /** |
| 690 * The URI to which the IDP redirects the user after the federated login flow. |
| 691 */ |
| 692 core.String continueUri; |
| 693 |
| 694 /** The email or federated ID of the user. */ |
| 695 core.String identifier; |
| 696 |
| 697 /** |
| 698 * Optional realm for OpenID protocol. The sub string "scheme://domain:port" |
| 699 * of the param "continueUri" is used if this is not set. |
| 700 */ |
| 701 core.String openidRealm; |
| 702 |
| 703 /** The native app package for OTA installation. */ |
| 704 core.String otaApp; |
| 705 |
| 706 /** |
| 707 * The IdP ID. For white listed IdPs it's a short domain name e.g. google.com, |
| 708 * aol.com, live.net and yahoo.com. For other OpenID IdPs it's the OP |
| 709 * identifier. |
| 710 */ |
| 711 core.String providerId; |
| 712 |
| 713 |
| 714 IdentitytoolkitRelyingpartyCreateAuthUriRequest(); |
| 715 |
| 716 IdentitytoolkitRelyingpartyCreateAuthUriRequest.fromJson(core.Map _json) { |
| 717 if (_json.containsKey("appId")) { |
| 718 appId = _json["appId"]; |
| 719 } |
| 720 if (_json.containsKey("clientId")) { |
| 721 clientId = _json["clientId"]; |
| 722 } |
| 723 if (_json.containsKey("context")) { |
| 724 context = _json["context"]; |
| 725 } |
| 726 if (_json.containsKey("continueUri")) { |
| 727 continueUri = _json["continueUri"]; |
| 728 } |
| 729 if (_json.containsKey("identifier")) { |
| 730 identifier = _json["identifier"]; |
| 731 } |
| 732 if (_json.containsKey("openidRealm")) { |
| 733 openidRealm = _json["openidRealm"]; |
| 734 } |
| 735 if (_json.containsKey("otaApp")) { |
| 736 otaApp = _json["otaApp"]; |
| 737 } |
| 738 if (_json.containsKey("providerId")) { |
| 739 providerId = _json["providerId"]; |
| 740 } |
| 741 } |
| 742 |
| 743 core.Map toJson() { |
| 744 var _json = new core.Map(); |
| 745 if (appId != null) { |
| 746 _json["appId"] = appId; |
| 747 } |
| 748 if (clientId != null) { |
| 749 _json["clientId"] = clientId; |
| 750 } |
| 751 if (context != null) { |
| 752 _json["context"] = context; |
| 753 } |
| 754 if (continueUri != null) { |
| 755 _json["continueUri"] = continueUri; |
| 756 } |
| 757 if (identifier != null) { |
| 758 _json["identifier"] = identifier; |
| 759 } |
| 760 if (openidRealm != null) { |
| 761 _json["openidRealm"] = openidRealm; |
| 762 } |
| 763 if (otaApp != null) { |
| 764 _json["otaApp"] = otaApp; |
| 765 } |
| 766 if (providerId != null) { |
| 767 _json["providerId"] = providerId; |
| 768 } |
| 769 return _json; |
| 770 } |
| 771 } |
| 772 |
| 773 |
| 774 /** Request to delete account. */ |
| 775 class IdentitytoolkitRelyingpartyDeleteAccountRequest { |
| 776 /** The local ID of the user. */ |
| 777 core.String localId; |
| 778 |
| 779 |
| 780 IdentitytoolkitRelyingpartyDeleteAccountRequest(); |
| 781 |
| 782 IdentitytoolkitRelyingpartyDeleteAccountRequest.fromJson(core.Map _json) { |
| 783 if (_json.containsKey("localId")) { |
| 784 localId = _json["localId"]; |
| 785 } |
| 786 } |
| 787 |
| 788 core.Map toJson() { |
| 789 var _json = new core.Map(); |
| 790 if (localId != null) { |
| 791 _json["localId"] = localId; |
| 792 } |
| 793 return _json; |
| 794 } |
| 795 } |
| 796 |
| 797 |
| 798 /** Request to download user account in batch. */ |
| 799 class IdentitytoolkitRelyingpartyDownloadAccountRequest { |
| 800 /** The max number of results to return in the response. */ |
| 801 core.int maxResults; |
| 802 |
| 803 /** |
| 804 * The token for the next page. This should be taken from the previous |
| 805 * response. |
| 806 */ |
| 807 core.String nextPageToken; |
| 808 |
| 809 |
| 810 IdentitytoolkitRelyingpartyDownloadAccountRequest(); |
| 811 |
| 812 IdentitytoolkitRelyingpartyDownloadAccountRequest.fromJson(core.Map _json) { |
| 813 if (_json.containsKey("maxResults")) { |
| 814 maxResults = _json["maxResults"]; |
| 815 } |
| 816 if (_json.containsKey("nextPageToken")) { |
| 817 nextPageToken = _json["nextPageToken"]; |
| 818 } |
| 819 } |
| 820 |
| 821 core.Map toJson() { |
| 822 var _json = new core.Map(); |
| 823 if (maxResults != null) { |
| 824 _json["maxResults"] = maxResults; |
| 825 } |
| 826 if (nextPageToken != null) { |
| 827 _json["nextPageToken"] = nextPageToken; |
| 828 } |
| 829 return _json; |
| 830 } |
| 831 } |
| 832 |
| 833 |
| 834 /** Request to get the account information. */ |
| 835 class IdentitytoolkitRelyingpartyGetAccountInfoRequest { |
| 836 /** The list of emails of the users to inquiry. */ |
| 837 core.List<core.String> email; |
| 838 |
| 839 /** The GITKit token of the authenticated user. */ |
| 840 core.String idToken; |
| 841 |
| 842 /** The list of local ID's of the users to inquiry. */ |
| 843 core.List<core.String> localId; |
| 844 |
| 845 |
| 846 IdentitytoolkitRelyingpartyGetAccountInfoRequest(); |
| 847 |
| 848 IdentitytoolkitRelyingpartyGetAccountInfoRequest.fromJson(core.Map _json) { |
| 849 if (_json.containsKey("email")) { |
| 850 email = _json["email"]; |
| 851 } |
| 852 if (_json.containsKey("idToken")) { |
| 853 idToken = _json["idToken"]; |
| 854 } |
| 855 if (_json.containsKey("localId")) { |
| 856 localId = _json["localId"]; |
| 857 } |
| 858 } |
| 859 |
| 860 core.Map toJson() { |
| 861 var _json = new core.Map(); |
| 862 if (email != null) { |
| 863 _json["email"] = email; |
| 864 } |
| 865 if (idToken != null) { |
| 866 _json["idToken"] = idToken; |
| 867 } |
| 868 if (localId != null) { |
| 869 _json["localId"] = localId; |
| 870 } |
| 871 return _json; |
| 872 } |
| 873 } |
| 874 |
| 875 |
| 876 /** Respone of getting public keys. */ |
| 877 class IdentitytoolkitRelyingpartyGetPublicKeysResponse |
| 878 extends collection.MapBase<core.String, core.String> { |
| 879 final core.Map _innerMap = {}; |
| 880 |
| 881 IdentitytoolkitRelyingpartyGetPublicKeysResponse(); |
| 882 |
| 883 IdentitytoolkitRelyingpartyGetPublicKeysResponse.fromJson(core.Map _json) { |
| 884 _json.forEach((core.String key, value) { |
| 885 this[key] = value; |
| 886 }); |
| 887 } |
| 888 |
| 889 core.Map toJson() { |
| 890 var _json = {}; |
| 891 this.forEach((core.String key, value) { |
| 892 _json[key] = value; |
| 893 }); |
| 894 return _json; |
| 895 } |
| 896 |
| 897 core.String operator [](core.Object key) |
| 898 => _innerMap[key]; |
| 899 |
| 900 operator []=(core.String key, core.String value) { |
| 901 _innerMap[key] = value; |
| 902 } |
| 903 |
| 904 void clear() { |
| 905 _innerMap.clear(); |
| 906 } |
| 907 |
| 908 core.Iterable<core.String> get keys => _innerMap.keys; |
| 909 |
| 910 core.String remove(core.Object key) => _innerMap.remove(key); |
| 911 } |
| 912 |
| 913 |
| 914 /** Request to reset the password. */ |
| 915 class IdentitytoolkitRelyingpartyResetPasswordRequest { |
| 916 /** The email address of the user. */ |
| 917 core.String email; |
| 918 |
| 919 /** The new password inputted by the user. */ |
| 920 core.String newPassword; |
| 921 |
| 922 /** The old password inputted by the user. */ |
| 923 core.String oldPassword; |
| 924 |
| 925 /** The confirmation code. */ |
| 926 core.String oobCode; |
| 927 |
| 928 |
| 929 IdentitytoolkitRelyingpartyResetPasswordRequest(); |
| 930 |
| 931 IdentitytoolkitRelyingpartyResetPasswordRequest.fromJson(core.Map _json) { |
| 932 if (_json.containsKey("email")) { |
| 933 email = _json["email"]; |
| 934 } |
| 935 if (_json.containsKey("newPassword")) { |
| 936 newPassword = _json["newPassword"]; |
| 937 } |
| 938 if (_json.containsKey("oldPassword")) { |
| 939 oldPassword = _json["oldPassword"]; |
| 940 } |
| 941 if (_json.containsKey("oobCode")) { |
| 942 oobCode = _json["oobCode"]; |
| 943 } |
| 944 } |
| 945 |
| 946 core.Map toJson() { |
| 947 var _json = new core.Map(); |
| 948 if (email != null) { |
| 949 _json["email"] = email; |
| 950 } |
| 951 if (newPassword != null) { |
| 952 _json["newPassword"] = newPassword; |
| 953 } |
| 954 if (oldPassword != null) { |
| 955 _json["oldPassword"] = oldPassword; |
| 956 } |
| 957 if (oobCode != null) { |
| 958 _json["oobCode"] = oobCode; |
| 959 } |
| 960 return _json; |
| 961 } |
| 962 } |
| 963 |
| 964 |
| 965 /** Request to set the account information. */ |
| 966 class IdentitytoolkitRelyingpartySetAccountInfoRequest { |
| 967 /** The captcha challenge. */ |
| 968 core.String captchaChallenge; |
| 969 |
| 970 /** Response to the captcha. */ |
| 971 core.String captchaResponse; |
| 972 |
| 973 /** The name of the user. */ |
| 974 core.String displayName; |
| 975 |
| 976 /** The email of the user. */ |
| 977 core.String email; |
| 978 |
| 979 /** Mark the email as verified or not. */ |
| 980 core.bool emailVerified; |
| 981 |
| 982 /** The GITKit token of the authenticated user. */ |
| 983 core.String idToken; |
| 984 |
| 985 /** The local ID of the user. */ |
| 986 core.String localId; |
| 987 |
| 988 /** The out-of-band code of the change email request. */ |
| 989 core.String oobCode; |
| 990 |
| 991 /** The new password of the user. */ |
| 992 core.String password; |
| 993 |
| 994 /** The associated IDPs of the user. */ |
| 995 core.List<core.String> provider; |
| 996 |
| 997 /** Mark the user to upgrade to federated login. */ |
| 998 core.bool upgradeToFederatedLogin; |
| 999 |
| 1000 |
| 1001 IdentitytoolkitRelyingpartySetAccountInfoRequest(); |
| 1002 |
| 1003 IdentitytoolkitRelyingpartySetAccountInfoRequest.fromJson(core.Map _json) { |
| 1004 if (_json.containsKey("captchaChallenge")) { |
| 1005 captchaChallenge = _json["captchaChallenge"]; |
| 1006 } |
| 1007 if (_json.containsKey("captchaResponse")) { |
| 1008 captchaResponse = _json["captchaResponse"]; |
| 1009 } |
| 1010 if (_json.containsKey("displayName")) { |
| 1011 displayName = _json["displayName"]; |
| 1012 } |
| 1013 if (_json.containsKey("email")) { |
| 1014 email = _json["email"]; |
| 1015 } |
| 1016 if (_json.containsKey("emailVerified")) { |
| 1017 emailVerified = _json["emailVerified"]; |
| 1018 } |
| 1019 if (_json.containsKey("idToken")) { |
| 1020 idToken = _json["idToken"]; |
| 1021 } |
| 1022 if (_json.containsKey("localId")) { |
| 1023 localId = _json["localId"]; |
| 1024 } |
| 1025 if (_json.containsKey("oobCode")) { |
| 1026 oobCode = _json["oobCode"]; |
| 1027 } |
| 1028 if (_json.containsKey("password")) { |
| 1029 password = _json["password"]; |
| 1030 } |
| 1031 if (_json.containsKey("provider")) { |
| 1032 provider = _json["provider"]; |
| 1033 } |
| 1034 if (_json.containsKey("upgradeToFederatedLogin")) { |
| 1035 upgradeToFederatedLogin = _json["upgradeToFederatedLogin"]; |
| 1036 } |
| 1037 } |
| 1038 |
| 1039 core.Map toJson() { |
| 1040 var _json = new core.Map(); |
| 1041 if (captchaChallenge != null) { |
| 1042 _json["captchaChallenge"] = captchaChallenge; |
| 1043 } |
| 1044 if (captchaResponse != null) { |
| 1045 _json["captchaResponse"] = captchaResponse; |
| 1046 } |
| 1047 if (displayName != null) { |
| 1048 _json["displayName"] = displayName; |
| 1049 } |
| 1050 if (email != null) { |
| 1051 _json["email"] = email; |
| 1052 } |
| 1053 if (emailVerified != null) { |
| 1054 _json["emailVerified"] = emailVerified; |
| 1055 } |
| 1056 if (idToken != null) { |
| 1057 _json["idToken"] = idToken; |
| 1058 } |
| 1059 if (localId != null) { |
| 1060 _json["localId"] = localId; |
| 1061 } |
| 1062 if (oobCode != null) { |
| 1063 _json["oobCode"] = oobCode; |
| 1064 } |
| 1065 if (password != null) { |
| 1066 _json["password"] = password; |
| 1067 } |
| 1068 if (provider != null) { |
| 1069 _json["provider"] = provider; |
| 1070 } |
| 1071 if (upgradeToFederatedLogin != null) { |
| 1072 _json["upgradeToFederatedLogin"] = upgradeToFederatedLogin; |
| 1073 } |
| 1074 return _json; |
| 1075 } |
| 1076 } |
| 1077 |
| 1078 |
| 1079 /** Request to upload user account in batch. */ |
| 1080 class IdentitytoolkitRelyingpartyUploadAccountRequest { |
| 1081 /** The password hash algorithm. */ |
| 1082 core.String hashAlgorithm; |
| 1083 |
| 1084 /** Memory cost for hash calculation. Used by scrypt similar algorithms. */ |
| 1085 core.int memoryCost; |
| 1086 |
| 1087 /** Rounds for hash calculation. Used by scrypt and similar algorithms. */ |
| 1088 core.int rounds; |
| 1089 |
| 1090 /** The salt separator. */ |
| 1091 core.String saltSeparator; |
| 1092 |
| 1093 core.List<core.int> get saltSeparatorAsBytes { |
| 1094 return crypto.CryptoUtils.base64StringToBytes(saltSeparator); |
| 1095 } |
| 1096 |
| 1097 void set saltSeparatorAsBytes(core.List<core.int> _bytes) { |
| 1098 saltSeparator = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 1099 } |
| 1100 |
| 1101 /** The key for to hash the password. */ |
| 1102 core.String signerKey; |
| 1103 |
| 1104 core.List<core.int> get signerKeyAsBytes { |
| 1105 return crypto.CryptoUtils.base64StringToBytes(signerKey); |
| 1106 } |
| 1107 |
| 1108 void set signerKeyAsBytes(core.List<core.int> _bytes) { |
| 1109 signerKey = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 1110 } |
| 1111 |
| 1112 /** The account info to be stored. */ |
| 1113 core.List<UserInfo> users; |
| 1114 |
| 1115 |
| 1116 IdentitytoolkitRelyingpartyUploadAccountRequest(); |
| 1117 |
| 1118 IdentitytoolkitRelyingpartyUploadAccountRequest.fromJson(core.Map _json) { |
| 1119 if (_json.containsKey("hashAlgorithm")) { |
| 1120 hashAlgorithm = _json["hashAlgorithm"]; |
| 1121 } |
| 1122 if (_json.containsKey("memoryCost")) { |
| 1123 memoryCost = _json["memoryCost"]; |
| 1124 } |
| 1125 if (_json.containsKey("rounds")) { |
| 1126 rounds = _json["rounds"]; |
| 1127 } |
| 1128 if (_json.containsKey("saltSeparator")) { |
| 1129 saltSeparator = _json["saltSeparator"]; |
| 1130 } |
| 1131 if (_json.containsKey("signerKey")) { |
| 1132 signerKey = _json["signerKey"]; |
| 1133 } |
| 1134 if (_json.containsKey("users")) { |
| 1135 users = _json["users"].map((value) => new UserInfo.fromJson(value)).toList
(); |
| 1136 } |
| 1137 } |
| 1138 |
| 1139 core.Map toJson() { |
| 1140 var _json = new core.Map(); |
| 1141 if (hashAlgorithm != null) { |
| 1142 _json["hashAlgorithm"] = hashAlgorithm; |
| 1143 } |
| 1144 if (memoryCost != null) { |
| 1145 _json["memoryCost"] = memoryCost; |
| 1146 } |
| 1147 if (rounds != null) { |
| 1148 _json["rounds"] = rounds; |
| 1149 } |
| 1150 if (saltSeparator != null) { |
| 1151 _json["saltSeparator"] = saltSeparator; |
| 1152 } |
| 1153 if (signerKey != null) { |
| 1154 _json["signerKey"] = signerKey; |
| 1155 } |
| 1156 if (users != null) { |
| 1157 _json["users"] = users.map((value) => (value).toJson()).toList(); |
| 1158 } |
| 1159 return _json; |
| 1160 } |
| 1161 } |
| 1162 |
| 1163 |
| 1164 /** Request to verify the IDP assertion. */ |
| 1165 class IdentitytoolkitRelyingpartyVerifyAssertionRequest { |
| 1166 /** |
| 1167 * The GITKit token for the non-trusted IDP pending to be confirmed by the |
| 1168 * user. |
| 1169 */ |
| 1170 core.String pendingIdToken; |
| 1171 |
| 1172 /** The post body if the request is a HTTP POST. */ |
| 1173 core.String postBody; |
| 1174 |
| 1175 /** |
| 1176 * The URI to which the IDP redirects the user back. It may contain federated |
| 1177 * login result params added by the IDP. |
| 1178 */ |
| 1179 core.String requestUri; |
| 1180 |
| 1181 |
| 1182 IdentitytoolkitRelyingpartyVerifyAssertionRequest(); |
| 1183 |
| 1184 IdentitytoolkitRelyingpartyVerifyAssertionRequest.fromJson(core.Map _json) { |
| 1185 if (_json.containsKey("pendingIdToken")) { |
| 1186 pendingIdToken = _json["pendingIdToken"]; |
| 1187 } |
| 1188 if (_json.containsKey("postBody")) { |
| 1189 postBody = _json["postBody"]; |
| 1190 } |
| 1191 if (_json.containsKey("requestUri")) { |
| 1192 requestUri = _json["requestUri"]; |
| 1193 } |
| 1194 } |
| 1195 |
| 1196 core.Map toJson() { |
| 1197 var _json = new core.Map(); |
| 1198 if (pendingIdToken != null) { |
| 1199 _json["pendingIdToken"] = pendingIdToken; |
| 1200 } |
| 1201 if (postBody != null) { |
| 1202 _json["postBody"] = postBody; |
| 1203 } |
| 1204 if (requestUri != null) { |
| 1205 _json["requestUri"] = requestUri; |
| 1206 } |
| 1207 return _json; |
| 1208 } |
| 1209 } |
| 1210 |
| 1211 |
| 1212 /** Request to verify the password. */ |
| 1213 class IdentitytoolkitRelyingpartyVerifyPasswordRequest { |
| 1214 /** The captcha challenge. */ |
| 1215 core.String captchaChallenge; |
| 1216 |
| 1217 /** Response to the captcha. */ |
| 1218 core.String captchaResponse; |
| 1219 |
| 1220 /** The email of the user. */ |
| 1221 core.String email; |
| 1222 |
| 1223 /** The password inputed by the user. */ |
| 1224 core.String password; |
| 1225 |
| 1226 /** |
| 1227 * The GITKit token for the non-trusted IDP, which is to be confirmed by the |
| 1228 * user. |
| 1229 */ |
| 1230 core.String pendingIdToken; |
| 1231 |
| 1232 |
| 1233 IdentitytoolkitRelyingpartyVerifyPasswordRequest(); |
| 1234 |
| 1235 IdentitytoolkitRelyingpartyVerifyPasswordRequest.fromJson(core.Map _json) { |
| 1236 if (_json.containsKey("captchaChallenge")) { |
| 1237 captchaChallenge = _json["captchaChallenge"]; |
| 1238 } |
| 1239 if (_json.containsKey("captchaResponse")) { |
| 1240 captchaResponse = _json["captchaResponse"]; |
| 1241 } |
| 1242 if (_json.containsKey("email")) { |
| 1243 email = _json["email"]; |
| 1244 } |
| 1245 if (_json.containsKey("password")) { |
| 1246 password = _json["password"]; |
| 1247 } |
| 1248 if (_json.containsKey("pendingIdToken")) { |
| 1249 pendingIdToken = _json["pendingIdToken"]; |
| 1250 } |
| 1251 } |
| 1252 |
| 1253 core.Map toJson() { |
| 1254 var _json = new core.Map(); |
| 1255 if (captchaChallenge != null) { |
| 1256 _json["captchaChallenge"] = captchaChallenge; |
| 1257 } |
| 1258 if (captchaResponse != null) { |
| 1259 _json["captchaResponse"] = captchaResponse; |
| 1260 } |
| 1261 if (email != null) { |
| 1262 _json["email"] = email; |
| 1263 } |
| 1264 if (password != null) { |
| 1265 _json["password"] = password; |
| 1266 } |
| 1267 if (pendingIdToken != null) { |
| 1268 _json["pendingIdToken"] = pendingIdToken; |
| 1269 } |
| 1270 return _json; |
| 1271 } |
| 1272 } |
| 1273 |
| 1274 |
| 1275 /** |
| 1276 * Request of getting a code for user confirmation (reset password, change email |
| 1277 * etc.) |
| 1278 */ |
| 1279 class Relyingparty { |
| 1280 /** The recaptcha response from the user. */ |
| 1281 core.String captchaResp; |
| 1282 |
| 1283 /** The recaptcha challenge presented to the user. */ |
| 1284 core.String challenge; |
| 1285 |
| 1286 /** The email of the user. */ |
| 1287 core.String email; |
| 1288 |
| 1289 /** The user's Gitkit login token for email change. */ |
| 1290 core.String idToken; |
| 1291 |
| 1292 /** The fixed string "identitytoolkit#relyingparty". */ |
| 1293 core.String kind; |
| 1294 |
| 1295 /** The new email if the code is for email change. */ |
| 1296 core.String newEmail; |
| 1297 |
| 1298 /** The request type. */ |
| 1299 core.String requestType; |
| 1300 |
| 1301 /** The IP address of the user. */ |
| 1302 core.String userIp; |
| 1303 |
| 1304 |
| 1305 Relyingparty(); |
| 1306 |
| 1307 Relyingparty.fromJson(core.Map _json) { |
| 1308 if (_json.containsKey("captchaResp")) { |
| 1309 captchaResp = _json["captchaResp"]; |
| 1310 } |
| 1311 if (_json.containsKey("challenge")) { |
| 1312 challenge = _json["challenge"]; |
| 1313 } |
| 1314 if (_json.containsKey("email")) { |
| 1315 email = _json["email"]; |
| 1316 } |
| 1317 if (_json.containsKey("idToken")) { |
| 1318 idToken = _json["idToken"]; |
| 1319 } |
| 1320 if (_json.containsKey("kind")) { |
| 1321 kind = _json["kind"]; |
| 1322 } |
| 1323 if (_json.containsKey("newEmail")) { |
| 1324 newEmail = _json["newEmail"]; |
| 1325 } |
| 1326 if (_json.containsKey("requestType")) { |
| 1327 requestType = _json["requestType"]; |
| 1328 } |
| 1329 if (_json.containsKey("userIp")) { |
| 1330 userIp = _json["userIp"]; |
| 1331 } |
| 1332 } |
| 1333 |
| 1334 core.Map toJson() { |
| 1335 var _json = new core.Map(); |
| 1336 if (captchaResp != null) { |
| 1337 _json["captchaResp"] = captchaResp; |
| 1338 } |
| 1339 if (challenge != null) { |
| 1340 _json["challenge"] = challenge; |
| 1341 } |
| 1342 if (email != null) { |
| 1343 _json["email"] = email; |
| 1344 } |
| 1345 if (idToken != null) { |
| 1346 _json["idToken"] = idToken; |
| 1347 } |
| 1348 if (kind != null) { |
| 1349 _json["kind"] = kind; |
| 1350 } |
| 1351 if (newEmail != null) { |
| 1352 _json["newEmail"] = newEmail; |
| 1353 } |
| 1354 if (requestType != null) { |
| 1355 _json["requestType"] = requestType; |
| 1356 } |
| 1357 if (userIp != null) { |
| 1358 _json["userIp"] = userIp; |
| 1359 } |
| 1360 return _json; |
| 1361 } |
| 1362 } |
| 1363 |
| 1364 |
| 1365 /** Response of resetting the password. */ |
| 1366 class ResetPasswordResponse { |
| 1367 /** The user's email. */ |
| 1368 core.String email; |
| 1369 |
| 1370 /** The fixed string "identitytoolkit#ResetPasswordResponse". */ |
| 1371 core.String kind; |
| 1372 |
| 1373 |
| 1374 ResetPasswordResponse(); |
| 1375 |
| 1376 ResetPasswordResponse.fromJson(core.Map _json) { |
| 1377 if (_json.containsKey("email")) { |
| 1378 email = _json["email"]; |
| 1379 } |
| 1380 if (_json.containsKey("kind")) { |
| 1381 kind = _json["kind"]; |
| 1382 } |
| 1383 } |
| 1384 |
| 1385 core.Map toJson() { |
| 1386 var _json = new core.Map(); |
| 1387 if (email != null) { |
| 1388 _json["email"] = email; |
| 1389 } |
| 1390 if (kind != null) { |
| 1391 _json["kind"] = kind; |
| 1392 } |
| 1393 return _json; |
| 1394 } |
| 1395 } |
| 1396 |
| 1397 |
| 1398 /** Not documented yet. */ |
| 1399 class SetAccountInfoResponseProviderUserInfo { |
| 1400 /** The user's display name at the IDP. */ |
| 1401 core.String displayName; |
| 1402 |
| 1403 /** The user's photo url at the IDP. */ |
| 1404 core.String photoUrl; |
| 1405 |
| 1406 /** |
| 1407 * The IdP ID. For whitelisted IdPs it's a short domain name, e.g., |
| 1408 * google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the |
| 1409 * OP identifier. |
| 1410 */ |
| 1411 core.String providerId; |
| 1412 |
| 1413 |
| 1414 SetAccountInfoResponseProviderUserInfo(); |
| 1415 |
| 1416 SetAccountInfoResponseProviderUserInfo.fromJson(core.Map _json) { |
| 1417 if (_json.containsKey("displayName")) { |
| 1418 displayName = _json["displayName"]; |
| 1419 } |
| 1420 if (_json.containsKey("photoUrl")) { |
| 1421 photoUrl = _json["photoUrl"]; |
| 1422 } |
| 1423 if (_json.containsKey("providerId")) { |
| 1424 providerId = _json["providerId"]; |
| 1425 } |
| 1426 } |
| 1427 |
| 1428 core.Map toJson() { |
| 1429 var _json = new core.Map(); |
| 1430 if (displayName != null) { |
| 1431 _json["displayName"] = displayName; |
| 1432 } |
| 1433 if (photoUrl != null) { |
| 1434 _json["photoUrl"] = photoUrl; |
| 1435 } |
| 1436 if (providerId != null) { |
| 1437 _json["providerId"] = providerId; |
| 1438 } |
| 1439 return _json; |
| 1440 } |
| 1441 } |
| 1442 |
| 1443 |
| 1444 /** Respone of setting the account information. */ |
| 1445 class SetAccountInfoResponse { |
| 1446 /** The name of the user. */ |
| 1447 core.String displayName; |
| 1448 |
| 1449 /** The email of the user. */ |
| 1450 core.String email; |
| 1451 |
| 1452 /** The Gitkit id token to login the newly sign up user. */ |
| 1453 core.String idToken; |
| 1454 |
| 1455 /** The fixed string "identitytoolkit#SetAccountInfoResponse". */ |
| 1456 core.String kind; |
| 1457 |
| 1458 /** The user's profiles at the associated IdPs. */ |
| 1459 core.List<SetAccountInfoResponseProviderUserInfo> providerUserInfo; |
| 1460 |
| 1461 |
| 1462 SetAccountInfoResponse(); |
| 1463 |
| 1464 SetAccountInfoResponse.fromJson(core.Map _json) { |
| 1465 if (_json.containsKey("displayName")) { |
| 1466 displayName = _json["displayName"]; |
| 1467 } |
| 1468 if (_json.containsKey("email")) { |
| 1469 email = _json["email"]; |
| 1470 } |
| 1471 if (_json.containsKey("idToken")) { |
| 1472 idToken = _json["idToken"]; |
| 1473 } |
| 1474 if (_json.containsKey("kind")) { |
| 1475 kind = _json["kind"]; |
| 1476 } |
| 1477 if (_json.containsKey("providerUserInfo")) { |
| 1478 providerUserInfo = _json["providerUserInfo"].map((value) => new SetAccount
InfoResponseProviderUserInfo.fromJson(value)).toList(); |
| 1479 } |
| 1480 } |
| 1481 |
| 1482 core.Map toJson() { |
| 1483 var _json = new core.Map(); |
| 1484 if (displayName != null) { |
| 1485 _json["displayName"] = displayName; |
| 1486 } |
| 1487 if (email != null) { |
| 1488 _json["email"] = email; |
| 1489 } |
| 1490 if (idToken != null) { |
| 1491 _json["idToken"] = idToken; |
| 1492 } |
| 1493 if (kind != null) { |
| 1494 _json["kind"] = kind; |
| 1495 } |
| 1496 if (providerUserInfo != null) { |
| 1497 _json["providerUserInfo"] = providerUserInfo.map((value) => (value).toJson
()).toList(); |
| 1498 } |
| 1499 return _json; |
| 1500 } |
| 1501 } |
| 1502 |
| 1503 |
| 1504 /** Not documented yet. */ |
| 1505 class UploadAccountResponseError { |
| 1506 /** The index of the malformed account, starting from 0. */ |
| 1507 core.int index; |
| 1508 |
| 1509 /** Detailed error message for the account info. */ |
| 1510 core.String message; |
| 1511 |
| 1512 |
| 1513 UploadAccountResponseError(); |
| 1514 |
| 1515 UploadAccountResponseError.fromJson(core.Map _json) { |
| 1516 if (_json.containsKey("index")) { |
| 1517 index = _json["index"]; |
| 1518 } |
| 1519 if (_json.containsKey("message")) { |
| 1520 message = _json["message"]; |
| 1521 } |
| 1522 } |
| 1523 |
| 1524 core.Map toJson() { |
| 1525 var _json = new core.Map(); |
| 1526 if (index != null) { |
| 1527 _json["index"] = index; |
| 1528 } |
| 1529 if (message != null) { |
| 1530 _json["message"] = message; |
| 1531 } |
| 1532 return _json; |
| 1533 } |
| 1534 } |
| 1535 |
| 1536 |
| 1537 /** Respone of uploading accounts in batch. */ |
| 1538 class UploadAccountResponse { |
| 1539 /** The error encountered while processing the account info. */ |
| 1540 core.List<UploadAccountResponseError> error; |
| 1541 |
| 1542 /** The fixed string "identitytoolkit#UploadAccountResponse". */ |
| 1543 core.String kind; |
| 1544 |
| 1545 |
| 1546 UploadAccountResponse(); |
| 1547 |
| 1548 UploadAccountResponse.fromJson(core.Map _json) { |
| 1549 if (_json.containsKey("error")) { |
| 1550 error = _json["error"].map((value) => new UploadAccountResponseError.fromJ
son(value)).toList(); |
| 1551 } |
| 1552 if (_json.containsKey("kind")) { |
| 1553 kind = _json["kind"]; |
| 1554 } |
| 1555 } |
| 1556 |
| 1557 core.Map toJson() { |
| 1558 var _json = new core.Map(); |
| 1559 if (error != null) { |
| 1560 _json["error"] = error.map((value) => (value).toJson()).toList(); |
| 1561 } |
| 1562 if (kind != null) { |
| 1563 _json["kind"] = kind; |
| 1564 } |
| 1565 return _json; |
| 1566 } |
| 1567 } |
| 1568 |
| 1569 |
| 1570 /** Not documented yet. */ |
| 1571 class UserInfoProviderUserInfo { |
| 1572 /** The user's display name at the IDP. */ |
| 1573 core.String displayName; |
| 1574 |
| 1575 /** User's identifier at IDP. */ |
| 1576 core.String federatedId; |
| 1577 |
| 1578 /** The user's photo url at the IDP. */ |
| 1579 core.String photoUrl; |
| 1580 |
| 1581 /** |
| 1582 * The IdP ID. For white listed IdPs it's a short domain name, e.g., |
| 1583 * google.com, aol.com, live.net and yahoo.com. For other OpenID IdPs it's the |
| 1584 * OP identifier. |
| 1585 */ |
| 1586 core.String providerId; |
| 1587 |
| 1588 |
| 1589 UserInfoProviderUserInfo(); |
| 1590 |
| 1591 UserInfoProviderUserInfo.fromJson(core.Map _json) { |
| 1592 if (_json.containsKey("displayName")) { |
| 1593 displayName = _json["displayName"]; |
| 1594 } |
| 1595 if (_json.containsKey("federatedId")) { |
| 1596 federatedId = _json["federatedId"]; |
| 1597 } |
| 1598 if (_json.containsKey("photoUrl")) { |
| 1599 photoUrl = _json["photoUrl"]; |
| 1600 } |
| 1601 if (_json.containsKey("providerId")) { |
| 1602 providerId = _json["providerId"]; |
| 1603 } |
| 1604 } |
| 1605 |
| 1606 core.Map toJson() { |
| 1607 var _json = new core.Map(); |
| 1608 if (displayName != null) { |
| 1609 _json["displayName"] = displayName; |
| 1610 } |
| 1611 if (federatedId != null) { |
| 1612 _json["federatedId"] = federatedId; |
| 1613 } |
| 1614 if (photoUrl != null) { |
| 1615 _json["photoUrl"] = photoUrl; |
| 1616 } |
| 1617 if (providerId != null) { |
| 1618 _json["providerId"] = providerId; |
| 1619 } |
| 1620 return _json; |
| 1621 } |
| 1622 } |
| 1623 |
| 1624 |
| 1625 /** Template for an individual account info. */ |
| 1626 class UserInfo { |
| 1627 /** The name of the user. */ |
| 1628 core.String displayName; |
| 1629 |
| 1630 /** The email of the user. */ |
| 1631 core.String email; |
| 1632 |
| 1633 /** Whether the email has been verified. */ |
| 1634 core.bool emailVerified; |
| 1635 |
| 1636 /** The local ID of the user. */ |
| 1637 core.String localId; |
| 1638 |
| 1639 /** The user's hashed password. */ |
| 1640 core.String passwordHash; |
| 1641 |
| 1642 core.List<core.int> get passwordHashAsBytes { |
| 1643 return crypto.CryptoUtils.base64StringToBytes(passwordHash); |
| 1644 } |
| 1645 |
| 1646 void set passwordHashAsBytes(core.List<core.int> _bytes) { |
| 1647 passwordHash = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 1648 } |
| 1649 |
| 1650 /** The timestamp when the password was last updated. */ |
| 1651 core.double passwordUpdatedAt; |
| 1652 |
| 1653 /** The URL of the user profile photo. */ |
| 1654 core.String photoUrl; |
| 1655 |
| 1656 /** The IDP of the user. */ |
| 1657 core.List<UserInfoProviderUserInfo> providerUserInfo; |
| 1658 |
| 1659 /** The user's password salt. */ |
| 1660 core.String salt; |
| 1661 |
| 1662 core.List<core.int> get saltAsBytes { |
| 1663 return crypto.CryptoUtils.base64StringToBytes(salt); |
| 1664 } |
| 1665 |
| 1666 void set saltAsBytes(core.List<core.int> _bytes) { |
| 1667 salt = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); |
| 1668 } |
| 1669 |
| 1670 /** Version of the user's password. */ |
| 1671 core.int version; |
| 1672 |
| 1673 |
| 1674 UserInfo(); |
| 1675 |
| 1676 UserInfo.fromJson(core.Map _json) { |
| 1677 if (_json.containsKey("displayName")) { |
| 1678 displayName = _json["displayName"]; |
| 1679 } |
| 1680 if (_json.containsKey("email")) { |
| 1681 email = _json["email"]; |
| 1682 } |
| 1683 if (_json.containsKey("emailVerified")) { |
| 1684 emailVerified = _json["emailVerified"]; |
| 1685 } |
| 1686 if (_json.containsKey("localId")) { |
| 1687 localId = _json["localId"]; |
| 1688 } |
| 1689 if (_json.containsKey("passwordHash")) { |
| 1690 passwordHash = _json["passwordHash"]; |
| 1691 } |
| 1692 if (_json.containsKey("passwordUpdatedAt")) { |
| 1693 passwordUpdatedAt = _json["passwordUpdatedAt"]; |
| 1694 } |
| 1695 if (_json.containsKey("photoUrl")) { |
| 1696 photoUrl = _json["photoUrl"]; |
| 1697 } |
| 1698 if (_json.containsKey("providerUserInfo")) { |
| 1699 providerUserInfo = _json["providerUserInfo"].map((value) => new UserInfoPr
oviderUserInfo.fromJson(value)).toList(); |
| 1700 } |
| 1701 if (_json.containsKey("salt")) { |
| 1702 salt = _json["salt"]; |
| 1703 } |
| 1704 if (_json.containsKey("version")) { |
| 1705 version = _json["version"]; |
| 1706 } |
| 1707 } |
| 1708 |
| 1709 core.Map toJson() { |
| 1710 var _json = new core.Map(); |
| 1711 if (displayName != null) { |
| 1712 _json["displayName"] = displayName; |
| 1713 } |
| 1714 if (email != null) { |
| 1715 _json["email"] = email; |
| 1716 } |
| 1717 if (emailVerified != null) { |
| 1718 _json["emailVerified"] = emailVerified; |
| 1719 } |
| 1720 if (localId != null) { |
| 1721 _json["localId"] = localId; |
| 1722 } |
| 1723 if (passwordHash != null) { |
| 1724 _json["passwordHash"] = passwordHash; |
| 1725 } |
| 1726 if (passwordUpdatedAt != null) { |
| 1727 _json["passwordUpdatedAt"] = passwordUpdatedAt; |
| 1728 } |
| 1729 if (photoUrl != null) { |
| 1730 _json["photoUrl"] = photoUrl; |
| 1731 } |
| 1732 if (providerUserInfo != null) { |
| 1733 _json["providerUserInfo"] = providerUserInfo.map((value) => (value).toJson
()).toList(); |
| 1734 } |
| 1735 if (salt != null) { |
| 1736 _json["salt"] = salt; |
| 1737 } |
| 1738 if (version != null) { |
| 1739 _json["version"] = version; |
| 1740 } |
| 1741 return _json; |
| 1742 } |
| 1743 } |
| 1744 |
| 1745 |
| 1746 /** Response of verifying the IDP assertion. */ |
| 1747 class VerifyAssertionResponse { |
| 1748 /** The action code. */ |
| 1749 core.String action; |
| 1750 |
| 1751 /** URL for OTA app installation. */ |
| 1752 core.String appInstallationUrl; |
| 1753 |
| 1754 /** The custom scheme used by mobile app. */ |
| 1755 core.String appScheme; |
| 1756 |
| 1757 /** |
| 1758 * The opaque value used by the client to maintain context info between the |
| 1759 * authentication request and the IDP callback. |
| 1760 */ |
| 1761 core.String context; |
| 1762 |
| 1763 /** The birth date of the IdP account. */ |
| 1764 core.String dateOfBirth; |
| 1765 |
| 1766 /** The display name of the user. */ |
| 1767 core.String displayName; |
| 1768 |
| 1769 /** |
| 1770 * The email returned by the IdP. NOTE: The federated login user may not own |
| 1771 * the email. |
| 1772 */ |
| 1773 core.String email; |
| 1774 |
| 1775 /** It's true if the email is recycled. */ |
| 1776 core.bool emailRecycled; |
| 1777 |
| 1778 /** |
| 1779 * The value is true if the IDP is also the email provider. It means the user |
| 1780 * owns the email. |
| 1781 */ |
| 1782 core.bool emailVerified; |
| 1783 |
| 1784 /** The unique ID identifies the IdP account. */ |
| 1785 core.String federatedId; |
| 1786 |
| 1787 /** The first name of the user. */ |
| 1788 core.String firstName; |
| 1789 |
| 1790 /** The full name of the user. */ |
| 1791 core.String fullName; |
| 1792 |
| 1793 /** The ID token. */ |
| 1794 core.String idToken; |
| 1795 |
| 1796 /** |
| 1797 * It's the identifier param in the createAuthUri request if the identifier is |
| 1798 * an email. It can be used to check whether the user input email is different |
| 1799 * from the asserted email. |
| 1800 */ |
| 1801 core.String inputEmail; |
| 1802 |
| 1803 /** The fixed string "identitytoolkit#VerifyAssertionResponse". */ |
| 1804 core.String kind; |
| 1805 |
| 1806 /** The language preference of the user. */ |
| 1807 core.String language; |
| 1808 |
| 1809 /** The last name of the user. */ |
| 1810 core.String lastName; |
| 1811 |
| 1812 /** |
| 1813 * The RP local ID if it's already been mapped to the IdP account identified |
| 1814 * by the federated ID. |
| 1815 */ |
| 1816 core.String localId; |
| 1817 |
| 1818 /** |
| 1819 * Whether the assertion is from a non-trusted IDP and need account linking |
| 1820 * confirmation. |
| 1821 */ |
| 1822 core.bool needConfirmation; |
| 1823 |
| 1824 /** The nick name of the user. */ |
| 1825 core.String nickName; |
| 1826 |
| 1827 /** The user approved request token for the OpenID OAuth extension. */ |
| 1828 core.String oauthRequestToken; |
| 1829 |
| 1830 /** The scope for the OpenID OAuth extension. */ |
| 1831 core.String oauthScope; |
| 1832 |
| 1833 /** |
| 1834 * The original email stored in the mapping storage. It's returned when the |
| 1835 * federated ID is associated to a different email. |
| 1836 */ |
| 1837 core.String originalEmail; |
| 1838 |
| 1839 /** The URI of the public accessible profiel picture. */ |
| 1840 core.String photoUrl; |
| 1841 |
| 1842 /** |
| 1843 * The IdP ID. For white listed IdPs it's a short domain name e.g. google.com, |
| 1844 * aol.com, live.net and yahoo.com. If the "providerId" param is set to OpenID |
| 1845 * OP identifer other than the whilte listed IdPs the OP identifier is |
| 1846 * returned. If the "identifier" param is federated ID in the createAuthUri |
| 1847 * request. The domain part of the federated ID is returned. |
| 1848 */ |
| 1849 core.String providerId; |
| 1850 |
| 1851 /** The timezone of the user. */ |
| 1852 core.String timeZone; |
| 1853 |
| 1854 /** |
| 1855 * When action is 'map', contains the idps which can be used for confirmation. |
| 1856 */ |
| 1857 core.List<core.String> verifiedProvider; |
| 1858 |
| 1859 |
| 1860 VerifyAssertionResponse(); |
| 1861 |
| 1862 VerifyAssertionResponse.fromJson(core.Map _json) { |
| 1863 if (_json.containsKey("action")) { |
| 1864 action = _json["action"]; |
| 1865 } |
| 1866 if (_json.containsKey("appInstallationUrl")) { |
| 1867 appInstallationUrl = _json["appInstallationUrl"]; |
| 1868 } |
| 1869 if (_json.containsKey("appScheme")) { |
| 1870 appScheme = _json["appScheme"]; |
| 1871 } |
| 1872 if (_json.containsKey("context")) { |
| 1873 context = _json["context"]; |
| 1874 } |
| 1875 if (_json.containsKey("dateOfBirth")) { |
| 1876 dateOfBirth = _json["dateOfBirth"]; |
| 1877 } |
| 1878 if (_json.containsKey("displayName")) { |
| 1879 displayName = _json["displayName"]; |
| 1880 } |
| 1881 if (_json.containsKey("email")) { |
| 1882 email = _json["email"]; |
| 1883 } |
| 1884 if (_json.containsKey("emailRecycled")) { |
| 1885 emailRecycled = _json["emailRecycled"]; |
| 1886 } |
| 1887 if (_json.containsKey("emailVerified")) { |
| 1888 emailVerified = _json["emailVerified"]; |
| 1889 } |
| 1890 if (_json.containsKey("federatedId")) { |
| 1891 federatedId = _json["federatedId"]; |
| 1892 } |
| 1893 if (_json.containsKey("firstName")) { |
| 1894 firstName = _json["firstName"]; |
| 1895 } |
| 1896 if (_json.containsKey("fullName")) { |
| 1897 fullName = _json["fullName"]; |
| 1898 } |
| 1899 if (_json.containsKey("idToken")) { |
| 1900 idToken = _json["idToken"]; |
| 1901 } |
| 1902 if (_json.containsKey("inputEmail")) { |
| 1903 inputEmail = _json["inputEmail"]; |
| 1904 } |
| 1905 if (_json.containsKey("kind")) { |
| 1906 kind = _json["kind"]; |
| 1907 } |
| 1908 if (_json.containsKey("language")) { |
| 1909 language = _json["language"]; |
| 1910 } |
| 1911 if (_json.containsKey("lastName")) { |
| 1912 lastName = _json["lastName"]; |
| 1913 } |
| 1914 if (_json.containsKey("localId")) { |
| 1915 localId = _json["localId"]; |
| 1916 } |
| 1917 if (_json.containsKey("needConfirmation")) { |
| 1918 needConfirmation = _json["needConfirmation"]; |
| 1919 } |
| 1920 if (_json.containsKey("nickName")) { |
| 1921 nickName = _json["nickName"]; |
| 1922 } |
| 1923 if (_json.containsKey("oauthRequestToken")) { |
| 1924 oauthRequestToken = _json["oauthRequestToken"]; |
| 1925 } |
| 1926 if (_json.containsKey("oauthScope")) { |
| 1927 oauthScope = _json["oauthScope"]; |
| 1928 } |
| 1929 if (_json.containsKey("originalEmail")) { |
| 1930 originalEmail = _json["originalEmail"]; |
| 1931 } |
| 1932 if (_json.containsKey("photoUrl")) { |
| 1933 photoUrl = _json["photoUrl"]; |
| 1934 } |
| 1935 if (_json.containsKey("providerId")) { |
| 1936 providerId = _json["providerId"]; |
| 1937 } |
| 1938 if (_json.containsKey("timeZone")) { |
| 1939 timeZone = _json["timeZone"]; |
| 1940 } |
| 1941 if (_json.containsKey("verifiedProvider")) { |
| 1942 verifiedProvider = _json["verifiedProvider"]; |
| 1943 } |
| 1944 } |
| 1945 |
| 1946 core.Map toJson() { |
| 1947 var _json = new core.Map(); |
| 1948 if (action != null) { |
| 1949 _json["action"] = action; |
| 1950 } |
| 1951 if (appInstallationUrl != null) { |
| 1952 _json["appInstallationUrl"] = appInstallationUrl; |
| 1953 } |
| 1954 if (appScheme != null) { |
| 1955 _json["appScheme"] = appScheme; |
| 1956 } |
| 1957 if (context != null) { |
| 1958 _json["context"] = context; |
| 1959 } |
| 1960 if (dateOfBirth != null) { |
| 1961 _json["dateOfBirth"] = dateOfBirth; |
| 1962 } |
| 1963 if (displayName != null) { |
| 1964 _json["displayName"] = displayName; |
| 1965 } |
| 1966 if (email != null) { |
| 1967 _json["email"] = email; |
| 1968 } |
| 1969 if (emailRecycled != null) { |
| 1970 _json["emailRecycled"] = emailRecycled; |
| 1971 } |
| 1972 if (emailVerified != null) { |
| 1973 _json["emailVerified"] = emailVerified; |
| 1974 } |
| 1975 if (federatedId != null) { |
| 1976 _json["federatedId"] = federatedId; |
| 1977 } |
| 1978 if (firstName != null) { |
| 1979 _json["firstName"] = firstName; |
| 1980 } |
| 1981 if (fullName != null) { |
| 1982 _json["fullName"] = fullName; |
| 1983 } |
| 1984 if (idToken != null) { |
| 1985 _json["idToken"] = idToken; |
| 1986 } |
| 1987 if (inputEmail != null) { |
| 1988 _json["inputEmail"] = inputEmail; |
| 1989 } |
| 1990 if (kind != null) { |
| 1991 _json["kind"] = kind; |
| 1992 } |
| 1993 if (language != null) { |
| 1994 _json["language"] = language; |
| 1995 } |
| 1996 if (lastName != null) { |
| 1997 _json["lastName"] = lastName; |
| 1998 } |
| 1999 if (localId != null) { |
| 2000 _json["localId"] = localId; |
| 2001 } |
| 2002 if (needConfirmation != null) { |
| 2003 _json["needConfirmation"] = needConfirmation; |
| 2004 } |
| 2005 if (nickName != null) { |
| 2006 _json["nickName"] = nickName; |
| 2007 } |
| 2008 if (oauthRequestToken != null) { |
| 2009 _json["oauthRequestToken"] = oauthRequestToken; |
| 2010 } |
| 2011 if (oauthScope != null) { |
| 2012 _json["oauthScope"] = oauthScope; |
| 2013 } |
| 2014 if (originalEmail != null) { |
| 2015 _json["originalEmail"] = originalEmail; |
| 2016 } |
| 2017 if (photoUrl != null) { |
| 2018 _json["photoUrl"] = photoUrl; |
| 2019 } |
| 2020 if (providerId != null) { |
| 2021 _json["providerId"] = providerId; |
| 2022 } |
| 2023 if (timeZone != null) { |
| 2024 _json["timeZone"] = timeZone; |
| 2025 } |
| 2026 if (verifiedProvider != null) { |
| 2027 _json["verifiedProvider"] = verifiedProvider; |
| 2028 } |
| 2029 return _json; |
| 2030 } |
| 2031 } |
| 2032 |
| 2033 |
| 2034 /** Request of verifying the password. */ |
| 2035 class VerifyPasswordResponse { |
| 2036 /** The name of the user. */ |
| 2037 core.String displayName; |
| 2038 |
| 2039 /** |
| 2040 * The email returned by the IdP. NOTE: The federated login user may not own |
| 2041 * the email. |
| 2042 */ |
| 2043 core.String email; |
| 2044 |
| 2045 /** The GITKit token for authenticated user. */ |
| 2046 core.String idToken; |
| 2047 |
| 2048 /** The fixed string "identitytoolkit#VerifyPasswordResponse". */ |
| 2049 core.String kind; |
| 2050 |
| 2051 /** |
| 2052 * The RP local ID if it's already been mapped to the IdP account identified |
| 2053 * by the federated ID. |
| 2054 */ |
| 2055 core.String localId; |
| 2056 |
| 2057 /** The URI of the user's photo at IdP */ |
| 2058 core.String photoUrl; |
| 2059 |
| 2060 /** Whether the email is registered. */ |
| 2061 core.bool registered; |
| 2062 |
| 2063 |
| 2064 VerifyPasswordResponse(); |
| 2065 |
| 2066 VerifyPasswordResponse.fromJson(core.Map _json) { |
| 2067 if (_json.containsKey("displayName")) { |
| 2068 displayName = _json["displayName"]; |
| 2069 } |
| 2070 if (_json.containsKey("email")) { |
| 2071 email = _json["email"]; |
| 2072 } |
| 2073 if (_json.containsKey("idToken")) { |
| 2074 idToken = _json["idToken"]; |
| 2075 } |
| 2076 if (_json.containsKey("kind")) { |
| 2077 kind = _json["kind"]; |
| 2078 } |
| 2079 if (_json.containsKey("localId")) { |
| 2080 localId = _json["localId"]; |
| 2081 } |
| 2082 if (_json.containsKey("photoUrl")) { |
| 2083 photoUrl = _json["photoUrl"]; |
| 2084 } |
| 2085 if (_json.containsKey("registered")) { |
| 2086 registered = _json["registered"]; |
| 2087 } |
| 2088 } |
| 2089 |
| 2090 core.Map toJson() { |
| 2091 var _json = new core.Map(); |
| 2092 if (displayName != null) { |
| 2093 _json["displayName"] = displayName; |
| 2094 } |
| 2095 if (email != null) { |
| 2096 _json["email"] = email; |
| 2097 } |
| 2098 if (idToken != null) { |
| 2099 _json["idToken"] = idToken; |
| 2100 } |
| 2101 if (kind != null) { |
| 2102 _json["kind"] = kind; |
| 2103 } |
| 2104 if (localId != null) { |
| 2105 _json["localId"] = localId; |
| 2106 } |
| 2107 if (photoUrl != null) { |
| 2108 _json["photoUrl"] = photoUrl; |
| 2109 } |
| 2110 if (registered != null) { |
| 2111 _json["registered"] = registered; |
| 2112 } |
| 2113 return _json; |
| 2114 } |
| 2115 } |
| 2116 |
| 2117 |
OLD | NEW |