OLD | NEW |
1 library googleapis.identitytoolkit.v3; | 1 library googleapis.identitytoolkit.v3; |
2 | 2 |
3 import "dart:core" as core; | 3 import "dart:core" as core; |
4 import "dart:collection" as collection; | 4 import "dart:collection" as collection; |
5 import "dart:async" as async; | 5 import "dart:async" as async; |
6 import "dart:convert" as convert; | 6 import "dart:convert" as convert; |
7 | 7 |
8 import "package:crypto/crypto.dart" as crypto; | 8 import "package:crypto/crypto.dart" as crypto; |
9 import 'package:http/http.dart' as http; | 9 import 'package:http/http.dart' as http; |
10 import '../src/common_internal.dart' as common_internal; | 10 import '../src/common_internal.dart' as common_internal; |
11 import '../common/common.dart' as common; | 11 import '../common/common.dart' as common; |
12 | 12 |
13 export '../common/common.dart' show ApiRequestError; | 13 export '../common/common.dart' show ApiRequestError; |
14 export '../common/common.dart' show DetailedApiRequestError; | 14 export '../common/common.dart' show DetailedApiRequestError; |
15 | 15 |
16 /** Help the third party sites to implement federated login. */ | 16 /** Help the third party sites to implement federated login. */ |
17 class IdentitytoolkitApi { | 17 class IdentitytoolkitApi { |
18 | 18 |
19 final common_internal.ApiRequester _requester; | 19 final common_internal.ApiRequester _requester; |
20 | 20 |
21 RelyingpartyResourceApi get relyingparty => new RelyingpartyResourceApi(_reque
ster); | 21 RelyingpartyResourceApi get relyingparty => new RelyingpartyResourceApi(_reque
ster); |
22 | 22 |
23 IdentitytoolkitApi(http.Client client) : | 23 IdentitytoolkitApi(http.Client client) : |
24 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "/identitytoolkit/v3/relyingparty/"); | 24 _requester = new common_internal.ApiRequester(client, "https://www.googlea
pis.com/", "identitytoolkit/v3/relyingparty/"); |
25 } | 25 } |
26 | 26 |
27 | 27 |
28 /** Not documented yet. */ | 28 /** Not documented yet. */ |
29 class RelyingpartyResourceApi { | 29 class RelyingpartyResourceApi { |
30 final common_internal.ApiRequester _requester; | 30 final common_internal.ApiRequester _requester; |
31 | 31 |
32 RelyingpartyResourceApi(common_internal.ApiRequester client) : | 32 RelyingpartyResourceApi(common_internal.ApiRequester client) : |
33 _requester = client; | 33 _requester = client; |
34 | 34 |
(...skipping 226 matching lines...) Loading... |
261 "GET", | 261 "GET", |
262 body: _body, | 262 body: _body, |
263 queryParams: _queryParams, | 263 queryParams: _queryParams, |
264 uploadOptions: _uploadOptions, | 264 uploadOptions: _uploadOptions, |
265 uploadMedia: _uploadMedia, | 265 uploadMedia: _uploadMedia, |
266 downloadOptions: _downloadOptions); | 266 downloadOptions: _downloadOptions); |
267 return _response.then((data) => new IdentitytoolkitRelyingpartyGetPublicKeys
Response.fromJson(data)); | 267 return _response.then((data) => new IdentitytoolkitRelyingpartyGetPublicKeys
Response.fromJson(data)); |
268 } | 268 } |
269 | 269 |
270 /** | 270 /** |
271 * Set account info for a user. | 271 * Reset password for a user. |
272 * | 272 * |
273 * [request] - The metadata request object. | 273 * [request] - The metadata request object. |
274 * | 274 * |
275 * Request parameters: | 275 * Request parameters: |
276 * | 276 * |
277 * Completes with a [ResetPasswordResponse]. | 277 * Completes with a [ResetPasswordResponse]. |
278 * | 278 * |
279 * Completes with a [common.ApiRequestError] if the API endpoint returned an | 279 * Completes with a [common.ApiRequestError] if the API endpoint returned an |
280 * error. | 280 * error. |
281 * | 281 * |
(...skipping 187 matching lines...) Loading... |
469 | 469 |
470 } | 470 } |
471 | 471 |
472 | 472 |
473 | 473 |
474 /** Response of creating the IDP authentication URL. */ | 474 /** Response of creating the IDP authentication URL. */ |
475 class CreateAuthUriResponse { | 475 class CreateAuthUriResponse { |
476 /** The URI used by the IDP to authenticate the user. */ | 476 /** The URI used by the IDP to authenticate the user. */ |
477 core.String authUri; | 477 core.String authUri; |
478 | 478 |
| 479 /** True if captcha is required. */ |
| 480 core.bool captchaRequired; |
| 481 |
479 /** True if the authUri is for user's existing provider. */ | 482 /** True if the authUri is for user's existing provider. */ |
480 core.bool forExistingProvider; | 483 core.bool forExistingProvider; |
481 | 484 |
482 /** The fixed string identitytoolkit#CreateAuthUriResponse". */ | 485 /** The fixed string identitytoolkit#CreateAuthUriResponse". */ |
483 core.String kind; | 486 core.String kind; |
484 | 487 |
485 /** The provider ID of the auth URI. */ | 488 /** The provider ID of the auth URI. */ |
486 core.String providerId; | 489 core.String providerId; |
487 | 490 |
488 /** Whether the user is registered if the identifier is an email. */ | 491 /** Whether the user is registered if the identifier is an email. */ |
489 core.bool registered; | 492 core.bool registered; |
490 | 493 |
491 | 494 |
492 CreateAuthUriResponse(); | 495 CreateAuthUriResponse(); |
493 | 496 |
494 CreateAuthUriResponse.fromJson(core.Map _json) { | 497 CreateAuthUriResponse.fromJson(core.Map _json) { |
495 if (_json.containsKey("authUri")) { | 498 if (_json.containsKey("authUri")) { |
496 authUri = _json["authUri"]; | 499 authUri = _json["authUri"]; |
497 } | 500 } |
| 501 if (_json.containsKey("captchaRequired")) { |
| 502 captchaRequired = _json["captchaRequired"]; |
| 503 } |
498 if (_json.containsKey("forExistingProvider")) { | 504 if (_json.containsKey("forExistingProvider")) { |
499 forExistingProvider = _json["forExistingProvider"]; | 505 forExistingProvider = _json["forExistingProvider"]; |
500 } | 506 } |
501 if (_json.containsKey("kind")) { | 507 if (_json.containsKey("kind")) { |
502 kind = _json["kind"]; | 508 kind = _json["kind"]; |
503 } | 509 } |
504 if (_json.containsKey("providerId")) { | 510 if (_json.containsKey("providerId")) { |
505 providerId = _json["providerId"]; | 511 providerId = _json["providerId"]; |
506 } | 512 } |
507 if (_json.containsKey("registered")) { | 513 if (_json.containsKey("registered")) { |
508 registered = _json["registered"]; | 514 registered = _json["registered"]; |
509 } | 515 } |
510 } | 516 } |
511 | 517 |
512 core.Map toJson() { | 518 core.Map toJson() { |
513 var _json = new core.Map(); | 519 var _json = new core.Map(); |
514 if (authUri != null) { | 520 if (authUri != null) { |
515 _json["authUri"] = authUri; | 521 _json["authUri"] = authUri; |
516 } | 522 } |
| 523 if (captchaRequired != null) { |
| 524 _json["captchaRequired"] = captchaRequired; |
| 525 } |
517 if (forExistingProvider != null) { | 526 if (forExistingProvider != null) { |
518 _json["forExistingProvider"] = forExistingProvider; | 527 _json["forExistingProvider"] = forExistingProvider; |
519 } | 528 } |
520 if (kind != null) { | 529 if (kind != null) { |
521 _json["kind"] = kind; | 530 _json["kind"] = kind; |
522 } | 531 } |
523 if (providerId != null) { | 532 if (providerId != null) { |
524 _json["providerId"] = providerId; | 533 _json["providerId"] = providerId; |
525 } | 534 } |
526 if (registered != null) { | 535 if (registered != null) { |
(...skipping 1581 matching lines...) Loading... |
2108 _json["photoUrl"] = photoUrl; | 2117 _json["photoUrl"] = photoUrl; |
2109 } | 2118 } |
2110 if (registered != null) { | 2119 if (registered != null) { |
2111 _json["registered"] = registered; | 2120 _json["registered"] = registered; |
2112 } | 2121 } |
2113 return _json; | 2122 return _json; |
2114 } | 2123 } |
2115 } | 2124 } |
2116 | 2125 |
2117 | 2126 |
OLD | NEW |