OLD | NEW |
1 // This is a generated file (see the discoveryapis_generator project). | 1 // This is a generated file (see the discoveryapis_generator project). |
2 | 2 |
3 library googleapis.identitytoolkit.v3; | 3 library googleapis.identitytoolkit.v3; |
4 | 4 |
5 import 'dart:core' as core; | 5 import 'dart:core' as core; |
6 import 'dart:collection' as collection; | 6 import 'dart:collection' as collection; |
7 import 'dart:async' as async; | 7 import 'dart:async' as async; |
8 import 'dart:convert' as convert; | 8 import 'dart:convert' as convert; |
9 | 9 |
10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; | 10 import 'package:_discoveryapis_commons/_discoveryapis_commons.dart' as commons; |
11 import 'package:crypto/crypto.dart' as crypto; | |
12 import 'package:http/http.dart' as http; | 11 import 'package:http/http.dart' as http; |
13 | 12 |
14 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show | 13 export 'package:_discoveryapis_commons/_discoveryapis_commons.dart' show |
15 ApiRequestError, DetailedApiRequestError; | 14 ApiRequestError, DetailedApiRequestError; |
16 | 15 |
17 const core.String USER_AGENT = 'dart-api-client identitytoolkit/v3'; | 16 const core.String USER_AGENT = 'dart-api-client identitytoolkit/v3'; |
18 | 17 |
19 /** Help the third party sites to implement federated login. */ | 18 /** Help the third party sites to implement federated login. */ |
20 class IdentitytoolkitApi { | 19 class IdentitytoolkitApi { |
21 | 20 |
(...skipping 1421 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1443 return _json; | 1442 return _json; |
1444 } | 1443 } |
1445 } | 1444 } |
1446 | 1445 |
1447 /** Request to set the account information. */ | 1446 /** Request to set the account information. */ |
1448 class IdentitytoolkitRelyingpartySetAccountInfoRequest { | 1447 class IdentitytoolkitRelyingpartySetAccountInfoRequest { |
1449 /** The captcha challenge. */ | 1448 /** The captcha challenge. */ |
1450 core.String captchaChallenge; | 1449 core.String captchaChallenge; |
1451 /** Response to the captcha. */ | 1450 /** Response to the captcha. */ |
1452 core.String captchaResponse; | 1451 core.String captchaResponse; |
| 1452 /** The timestamp when the account is created. */ |
| 1453 core.String createdAt; |
1453 /** | 1454 /** |
1454 * GCP project number of the requesting delegated app. Currently only intended | 1455 * GCP project number of the requesting delegated app. Currently only intended |
1455 * for Firebase V1 migration. | 1456 * for Firebase V1 migration. |
1456 */ | 1457 */ |
1457 core.String delegatedProjectNumber; | 1458 core.String delegatedProjectNumber; |
1458 /** The attributes users request to delete. */ | 1459 /** The attributes users request to delete. */ |
1459 core.List<core.String> deleteAttribute; | 1460 core.List<core.String> deleteAttribute; |
1460 /** The IDPs the user request to delete. */ | 1461 /** The IDPs the user request to delete. */ |
1461 core.List<core.String> deleteProvider; | 1462 core.List<core.String> deleteProvider; |
1462 /** Whether to disable the user. */ | 1463 /** Whether to disable the user. */ |
1463 core.bool disableUser; | 1464 core.bool disableUser; |
1464 /** The name of the user. */ | 1465 /** The name of the user. */ |
1465 core.String displayName; | 1466 core.String displayName; |
1466 /** The email of the user. */ | 1467 /** The email of the user. */ |
1467 core.String email; | 1468 core.String email; |
1468 /** Mark the email as verified or not. */ | 1469 /** Mark the email as verified or not. */ |
1469 core.bool emailVerified; | 1470 core.bool emailVerified; |
1470 /** The GITKit token of the authenticated user. */ | 1471 /** The GITKit token of the authenticated user. */ |
1471 core.String idToken; | 1472 core.String idToken; |
1472 /** Instance id token of the app. */ | 1473 /** Instance id token of the app. */ |
1473 core.String instanceId; | 1474 core.String instanceId; |
| 1475 /** Last login timestamp. */ |
| 1476 core.String lastLoginAt; |
1474 /** The local ID of the user. */ | 1477 /** The local ID of the user. */ |
1475 core.String localId; | 1478 core.String localId; |
1476 /** The out-of-band code of the change email request. */ | 1479 /** The out-of-band code of the change email request. */ |
1477 core.String oobCode; | 1480 core.String oobCode; |
1478 /** The new password of the user. */ | 1481 /** The new password of the user. */ |
1479 core.String password; | 1482 core.String password; |
1480 /** The photo url of the user. */ | 1483 /** The photo url of the user. */ |
1481 core.String photoUrl; | 1484 core.String photoUrl; |
1482 /** The associated IDPs of the user. */ | 1485 /** The associated IDPs of the user. */ |
1483 core.List<core.String> provider; | 1486 core.List<core.String> provider; |
1484 /** Whether return sts id token and refresh token instead of gitkit token. */ | 1487 /** Whether return sts id token and refresh token instead of gitkit token. */ |
1485 core.bool returnSecureToken; | 1488 core.bool returnSecureToken; |
1486 /** Mark the user to upgrade to federated login. */ | 1489 /** Mark the user to upgrade to federated login. */ |
1487 core.bool upgradeToFederatedLogin; | 1490 core.bool upgradeToFederatedLogin; |
1488 /** Timestamp in seconds for valid login token. */ | 1491 /** Timestamp in seconds for valid login token. */ |
1489 core.String validSince; | 1492 core.String validSince; |
1490 | 1493 |
1491 IdentitytoolkitRelyingpartySetAccountInfoRequest(); | 1494 IdentitytoolkitRelyingpartySetAccountInfoRequest(); |
1492 | 1495 |
1493 IdentitytoolkitRelyingpartySetAccountInfoRequest.fromJson(core.Map _json) { | 1496 IdentitytoolkitRelyingpartySetAccountInfoRequest.fromJson(core.Map _json) { |
1494 if (_json.containsKey("captchaChallenge")) { | 1497 if (_json.containsKey("captchaChallenge")) { |
1495 captchaChallenge = _json["captchaChallenge"]; | 1498 captchaChallenge = _json["captchaChallenge"]; |
1496 } | 1499 } |
1497 if (_json.containsKey("captchaResponse")) { | 1500 if (_json.containsKey("captchaResponse")) { |
1498 captchaResponse = _json["captchaResponse"]; | 1501 captchaResponse = _json["captchaResponse"]; |
1499 } | 1502 } |
| 1503 if (_json.containsKey("createdAt")) { |
| 1504 createdAt = _json["createdAt"]; |
| 1505 } |
1500 if (_json.containsKey("delegatedProjectNumber")) { | 1506 if (_json.containsKey("delegatedProjectNumber")) { |
1501 delegatedProjectNumber = _json["delegatedProjectNumber"]; | 1507 delegatedProjectNumber = _json["delegatedProjectNumber"]; |
1502 } | 1508 } |
1503 if (_json.containsKey("deleteAttribute")) { | 1509 if (_json.containsKey("deleteAttribute")) { |
1504 deleteAttribute = _json["deleteAttribute"]; | 1510 deleteAttribute = _json["deleteAttribute"]; |
1505 } | 1511 } |
1506 if (_json.containsKey("deleteProvider")) { | 1512 if (_json.containsKey("deleteProvider")) { |
1507 deleteProvider = _json["deleteProvider"]; | 1513 deleteProvider = _json["deleteProvider"]; |
1508 } | 1514 } |
1509 if (_json.containsKey("disableUser")) { | 1515 if (_json.containsKey("disableUser")) { |
1510 disableUser = _json["disableUser"]; | 1516 disableUser = _json["disableUser"]; |
1511 } | 1517 } |
1512 if (_json.containsKey("displayName")) { | 1518 if (_json.containsKey("displayName")) { |
1513 displayName = _json["displayName"]; | 1519 displayName = _json["displayName"]; |
1514 } | 1520 } |
1515 if (_json.containsKey("email")) { | 1521 if (_json.containsKey("email")) { |
1516 email = _json["email"]; | 1522 email = _json["email"]; |
1517 } | 1523 } |
1518 if (_json.containsKey("emailVerified")) { | 1524 if (_json.containsKey("emailVerified")) { |
1519 emailVerified = _json["emailVerified"]; | 1525 emailVerified = _json["emailVerified"]; |
1520 } | 1526 } |
1521 if (_json.containsKey("idToken")) { | 1527 if (_json.containsKey("idToken")) { |
1522 idToken = _json["idToken"]; | 1528 idToken = _json["idToken"]; |
1523 } | 1529 } |
1524 if (_json.containsKey("instanceId")) { | 1530 if (_json.containsKey("instanceId")) { |
1525 instanceId = _json["instanceId"]; | 1531 instanceId = _json["instanceId"]; |
1526 } | 1532 } |
| 1533 if (_json.containsKey("lastLoginAt")) { |
| 1534 lastLoginAt = _json["lastLoginAt"]; |
| 1535 } |
1527 if (_json.containsKey("localId")) { | 1536 if (_json.containsKey("localId")) { |
1528 localId = _json["localId"]; | 1537 localId = _json["localId"]; |
1529 } | 1538 } |
1530 if (_json.containsKey("oobCode")) { | 1539 if (_json.containsKey("oobCode")) { |
1531 oobCode = _json["oobCode"]; | 1540 oobCode = _json["oobCode"]; |
1532 } | 1541 } |
1533 if (_json.containsKey("password")) { | 1542 if (_json.containsKey("password")) { |
1534 password = _json["password"]; | 1543 password = _json["password"]; |
1535 } | 1544 } |
1536 if (_json.containsKey("photoUrl")) { | 1545 if (_json.containsKey("photoUrl")) { |
(...skipping 14 matching lines...) Expand all Loading... |
1551 } | 1560 } |
1552 | 1561 |
1553 core.Map toJson() { | 1562 core.Map toJson() { |
1554 var _json = new core.Map(); | 1563 var _json = new core.Map(); |
1555 if (captchaChallenge != null) { | 1564 if (captchaChallenge != null) { |
1556 _json["captchaChallenge"] = captchaChallenge; | 1565 _json["captchaChallenge"] = captchaChallenge; |
1557 } | 1566 } |
1558 if (captchaResponse != null) { | 1567 if (captchaResponse != null) { |
1559 _json["captchaResponse"] = captchaResponse; | 1568 _json["captchaResponse"] = captchaResponse; |
1560 } | 1569 } |
| 1570 if (createdAt != null) { |
| 1571 _json["createdAt"] = createdAt; |
| 1572 } |
1561 if (delegatedProjectNumber != null) { | 1573 if (delegatedProjectNumber != null) { |
1562 _json["delegatedProjectNumber"] = delegatedProjectNumber; | 1574 _json["delegatedProjectNumber"] = delegatedProjectNumber; |
1563 } | 1575 } |
1564 if (deleteAttribute != null) { | 1576 if (deleteAttribute != null) { |
1565 _json["deleteAttribute"] = deleteAttribute; | 1577 _json["deleteAttribute"] = deleteAttribute; |
1566 } | 1578 } |
1567 if (deleteProvider != null) { | 1579 if (deleteProvider != null) { |
1568 _json["deleteProvider"] = deleteProvider; | 1580 _json["deleteProvider"] = deleteProvider; |
1569 } | 1581 } |
1570 if (disableUser != null) { | 1582 if (disableUser != null) { |
1571 _json["disableUser"] = disableUser; | 1583 _json["disableUser"] = disableUser; |
1572 } | 1584 } |
1573 if (displayName != null) { | 1585 if (displayName != null) { |
1574 _json["displayName"] = displayName; | 1586 _json["displayName"] = displayName; |
1575 } | 1587 } |
1576 if (email != null) { | 1588 if (email != null) { |
1577 _json["email"] = email; | 1589 _json["email"] = email; |
1578 } | 1590 } |
1579 if (emailVerified != null) { | 1591 if (emailVerified != null) { |
1580 _json["emailVerified"] = emailVerified; | 1592 _json["emailVerified"] = emailVerified; |
1581 } | 1593 } |
1582 if (idToken != null) { | 1594 if (idToken != null) { |
1583 _json["idToken"] = idToken; | 1595 _json["idToken"] = idToken; |
1584 } | 1596 } |
1585 if (instanceId != null) { | 1597 if (instanceId != null) { |
1586 _json["instanceId"] = instanceId; | 1598 _json["instanceId"] = instanceId; |
1587 } | 1599 } |
| 1600 if (lastLoginAt != null) { |
| 1601 _json["lastLoginAt"] = lastLoginAt; |
| 1602 } |
1588 if (localId != null) { | 1603 if (localId != null) { |
1589 _json["localId"] = localId; | 1604 _json["localId"] = localId; |
1590 } | 1605 } |
1591 if (oobCode != null) { | 1606 if (oobCode != null) { |
1592 _json["oobCode"] = oobCode; | 1607 _json["oobCode"] = oobCode; |
1593 } | 1608 } |
1594 if (password != null) { | 1609 if (password != null) { |
1595 _json["password"] = password; | 1610 _json["password"] = password; |
1596 } | 1611 } |
1597 if (photoUrl != null) { | 1612 if (photoUrl != null) { |
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1873 core.String delegatedProjectNumber; | 1888 core.String delegatedProjectNumber; |
1874 /** The password hash algorithm. */ | 1889 /** The password hash algorithm. */ |
1875 core.String hashAlgorithm; | 1890 core.String hashAlgorithm; |
1876 /** Memory cost for hash calculation. Used by scrypt similar algorithms. */ | 1891 /** Memory cost for hash calculation. Used by scrypt similar algorithms. */ |
1877 core.int memoryCost; | 1892 core.int memoryCost; |
1878 /** Rounds for hash calculation. Used by scrypt and similar algorithms. */ | 1893 /** Rounds for hash calculation. Used by scrypt and similar algorithms. */ |
1879 core.int rounds; | 1894 core.int rounds; |
1880 /** The salt separator. */ | 1895 /** The salt separator. */ |
1881 core.String saltSeparator; | 1896 core.String saltSeparator; |
1882 core.List<core.int> get saltSeparatorAsBytes { | 1897 core.List<core.int> get saltSeparatorAsBytes { |
1883 return crypto.CryptoUtils.base64StringToBytes(saltSeparator); | 1898 return convert.BASE64.decode(saltSeparator); |
1884 } | 1899 } |
1885 | 1900 |
1886 void set saltSeparatorAsBytes(core.List<core.int> _bytes) { | 1901 void set saltSeparatorAsBytes(core.List<core.int> _bytes) { |
1887 saltSeparator = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1902 saltSeparator = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAl
l("+", "-"); |
1888 } | 1903 } |
1889 /** The key for to hash the password. */ | 1904 /** The key for to hash the password. */ |
1890 core.String signerKey; | 1905 core.String signerKey; |
1891 core.List<core.int> get signerKeyAsBytes { | 1906 core.List<core.int> get signerKeyAsBytes { |
1892 return crypto.CryptoUtils.base64StringToBytes(signerKey); | 1907 return convert.BASE64.decode(signerKey); |
1893 } | 1908 } |
1894 | 1909 |
1895 void set signerKeyAsBytes(core.List<core.int> _bytes) { | 1910 void set signerKeyAsBytes(core.List<core.int> _bytes) { |
1896 signerKey = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 1911 signerKey = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+
", "-"); |
1897 } | 1912 } |
1898 /** The account info to be stored. */ | 1913 /** The account info to be stored. */ |
1899 core.List<UserInfo> users; | 1914 core.List<UserInfo> users; |
1900 | 1915 |
1901 IdentitytoolkitRelyingpartyUploadAccountRequest(); | 1916 IdentitytoolkitRelyingpartyUploadAccountRequest(); |
1902 | 1917 |
1903 IdentitytoolkitRelyingpartyUploadAccountRequest.fromJson(core.Map _json) { | 1918 IdentitytoolkitRelyingpartyUploadAccountRequest.fromJson(core.Map _json) { |
1904 if (_json.containsKey("delegatedProjectNumber")) { | 1919 if (_json.containsKey("delegatedProjectNumber")) { |
1905 delegatedProjectNumber = _json["delegatedProjectNumber"]; | 1920 delegatedProjectNumber = _json["delegatedProjectNumber"]; |
1906 } | 1921 } |
(...skipping 290 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2197 core.bool enabled; | 2212 core.bool enabled; |
2198 /** | 2213 /** |
2199 * Percent of users who will be prompted/redirected federated login for this | 2214 * Percent of users who will be prompted/redirected federated login for this |
2200 * IDP. | 2215 * IDP. |
2201 */ | 2216 */ |
2202 core.int experimentPercent; | 2217 core.int experimentPercent; |
2203 /** OAuth2 provider. */ | 2218 /** OAuth2 provider. */ |
2204 core.String provider; | 2219 core.String provider; |
2205 /** OAuth2 client secret. */ | 2220 /** OAuth2 client secret. */ |
2206 core.String secret; | 2221 core.String secret; |
| 2222 /** Whitelisted client IDs for audience check. */ |
| 2223 core.List<core.String> whitelistedAudiences; |
2207 | 2224 |
2208 IdpConfig(); | 2225 IdpConfig(); |
2209 | 2226 |
2210 IdpConfig.fromJson(core.Map _json) { | 2227 IdpConfig.fromJson(core.Map _json) { |
2211 if (_json.containsKey("clientId")) { | 2228 if (_json.containsKey("clientId")) { |
2212 clientId = _json["clientId"]; | 2229 clientId = _json["clientId"]; |
2213 } | 2230 } |
2214 if (_json.containsKey("enabled")) { | 2231 if (_json.containsKey("enabled")) { |
2215 enabled = _json["enabled"]; | 2232 enabled = _json["enabled"]; |
2216 } | 2233 } |
2217 if (_json.containsKey("experimentPercent")) { | 2234 if (_json.containsKey("experimentPercent")) { |
2218 experimentPercent = _json["experimentPercent"]; | 2235 experimentPercent = _json["experimentPercent"]; |
2219 } | 2236 } |
2220 if (_json.containsKey("provider")) { | 2237 if (_json.containsKey("provider")) { |
2221 provider = _json["provider"]; | 2238 provider = _json["provider"]; |
2222 } | 2239 } |
2223 if (_json.containsKey("secret")) { | 2240 if (_json.containsKey("secret")) { |
2224 secret = _json["secret"]; | 2241 secret = _json["secret"]; |
2225 } | 2242 } |
| 2243 if (_json.containsKey("whitelistedAudiences")) { |
| 2244 whitelistedAudiences = _json["whitelistedAudiences"]; |
| 2245 } |
2226 } | 2246 } |
2227 | 2247 |
2228 core.Map toJson() { | 2248 core.Map toJson() { |
2229 var _json = new core.Map(); | 2249 var _json = new core.Map(); |
2230 if (clientId != null) { | 2250 if (clientId != null) { |
2231 _json["clientId"] = clientId; | 2251 _json["clientId"] = clientId; |
2232 } | 2252 } |
2233 if (enabled != null) { | 2253 if (enabled != null) { |
2234 _json["enabled"] = enabled; | 2254 _json["enabled"] = enabled; |
2235 } | 2255 } |
2236 if (experimentPercent != null) { | 2256 if (experimentPercent != null) { |
2237 _json["experimentPercent"] = experimentPercent; | 2257 _json["experimentPercent"] = experimentPercent; |
2238 } | 2258 } |
2239 if (provider != null) { | 2259 if (provider != null) { |
2240 _json["provider"] = provider; | 2260 _json["provider"] = provider; |
2241 } | 2261 } |
2242 if (secret != null) { | 2262 if (secret != null) { |
2243 _json["secret"] = secret; | 2263 _json["secret"] = secret; |
2244 } | 2264 } |
| 2265 if (whitelistedAudiences != null) { |
| 2266 _json["whitelistedAudiences"] = whitelistedAudiences; |
| 2267 } |
2245 return _json; | 2268 return _json; |
2246 } | 2269 } |
2247 } | 2270 } |
2248 | 2271 |
2249 /** | 2272 /** |
2250 * Request of getting a code for user confirmation (reset password, change email | 2273 * Request of getting a code for user confirmation (reset password, change email |
2251 * etc.) | 2274 * etc.) |
2252 */ | 2275 */ |
2253 class Relyingparty { | 2276 class Relyingparty { |
2254 /** The recaptcha response from the user. */ | 2277 /** The recaptcha response from the user. */ |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2421 core.String idToken; | 2444 core.String idToken; |
2422 /** The fixed string "identitytoolkit#SetAccountInfoResponse". */ | 2445 /** The fixed string "identitytoolkit#SetAccountInfoResponse". */ |
2423 core.String kind; | 2446 core.String kind; |
2424 /** The local ID of the user. */ | 2447 /** The local ID of the user. */ |
2425 core.String localId; | 2448 core.String localId; |
2426 /** The new email the user attempts to change to. */ | 2449 /** The new email the user attempts to change to. */ |
2427 core.String newEmail; | 2450 core.String newEmail; |
2428 /** The user's hashed password. */ | 2451 /** The user's hashed password. */ |
2429 core.String passwordHash; | 2452 core.String passwordHash; |
2430 core.List<core.int> get passwordHashAsBytes { | 2453 core.List<core.int> get passwordHashAsBytes { |
2431 return crypto.CryptoUtils.base64StringToBytes(passwordHash); | 2454 return convert.BASE64.decode(passwordHash); |
2432 } | 2455 } |
2433 | 2456 |
2434 void set passwordHashAsBytes(core.List<core.int> _bytes) { | 2457 void set passwordHashAsBytes(core.List<core.int> _bytes) { |
2435 passwordHash = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 2458 passwordHash = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll
("+", "-"); |
2436 } | 2459 } |
2437 /** The photo url of the user. */ | 2460 /** The photo url of the user. */ |
2438 core.String photoUrl; | 2461 core.String photoUrl; |
2439 /** The user's profiles at the associated IdPs. */ | 2462 /** The user's profiles at the associated IdPs. */ |
2440 core.List<SetAccountInfoResponseProviderUserInfo> providerUserInfo; | 2463 core.List<SetAccountInfoResponseProviderUserInfo> providerUserInfo; |
2441 /** If idToken is STS id token, then this field will be refresh token. */ | 2464 /** If idToken is STS id token, then this field will be refresh token. */ |
2442 core.String refreshToken; | 2465 core.String refreshToken; |
2443 | 2466 |
2444 SetAccountInfoResponse(); | 2467 SetAccountInfoResponse(); |
2445 | 2468 |
(...skipping 267 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2713 } | 2736 } |
2714 if (rawId != null) { | 2737 if (rawId != null) { |
2715 _json["rawId"] = rawId; | 2738 _json["rawId"] = rawId; |
2716 } | 2739 } |
2717 return _json; | 2740 return _json; |
2718 } | 2741 } |
2719 } | 2742 } |
2720 | 2743 |
2721 /** Template for an individual account info. */ | 2744 /** Template for an individual account info. */ |
2722 class UserInfo { | 2745 class UserInfo { |
| 2746 /** User creation timestamp. */ |
| 2747 core.String createdAt; |
2723 /** Whether the user is disabled. */ | 2748 /** Whether the user is disabled. */ |
2724 core.bool disabled; | 2749 core.bool disabled; |
2725 /** The name of the user. */ | 2750 /** The name of the user. */ |
2726 core.String displayName; | 2751 core.String displayName; |
2727 /** The email of the user. */ | 2752 /** The email of the user. */ |
2728 core.String email; | 2753 core.String email; |
2729 /** Whether the email has been verified. */ | 2754 /** Whether the email has been verified. */ |
2730 core.bool emailVerified; | 2755 core.bool emailVerified; |
| 2756 /** last login timestamp. */ |
| 2757 core.String lastLoginAt; |
2731 /** The local ID of the user. */ | 2758 /** The local ID of the user. */ |
2732 core.String localId; | 2759 core.String localId; |
2733 /** The user's hashed password. */ | 2760 /** The user's hashed password. */ |
2734 core.String passwordHash; | 2761 core.String passwordHash; |
2735 core.List<core.int> get passwordHashAsBytes { | 2762 core.List<core.int> get passwordHashAsBytes { |
2736 return crypto.CryptoUtils.base64StringToBytes(passwordHash); | 2763 return convert.BASE64.decode(passwordHash); |
2737 } | 2764 } |
2738 | 2765 |
2739 void set passwordHashAsBytes(core.List<core.int> _bytes) { | 2766 void set passwordHashAsBytes(core.List<core.int> _bytes) { |
2740 passwordHash = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 2767 passwordHash = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll
("+", "-"); |
2741 } | 2768 } |
2742 /** The timestamp when the password was last updated. */ | 2769 /** The timestamp when the password was last updated. */ |
2743 core.double passwordUpdatedAt; | 2770 core.double passwordUpdatedAt; |
2744 /** The URL of the user profile photo. */ | 2771 /** The URL of the user profile photo. */ |
2745 core.String photoUrl; | 2772 core.String photoUrl; |
2746 /** The IDP of the user. */ | 2773 /** The IDP of the user. */ |
2747 core.List<UserInfoProviderUserInfo> providerUserInfo; | 2774 core.List<UserInfoProviderUserInfo> providerUserInfo; |
2748 /** The user's password salt. */ | 2775 /** The user's password salt. */ |
2749 core.String salt; | 2776 core.String salt; |
2750 core.List<core.int> get saltAsBytes { | 2777 core.List<core.int> get saltAsBytes { |
2751 return crypto.CryptoUtils.base64StringToBytes(salt); | 2778 return convert.BASE64.decode(salt); |
2752 } | 2779 } |
2753 | 2780 |
2754 void set saltAsBytes(core.List<core.int> _bytes) { | 2781 void set saltAsBytes(core.List<core.int> _bytes) { |
2755 salt = crypto.CryptoUtils.bytesToBase64(_bytes, urlSafe: true); | 2782 salt = convert.BASE64.encode(_bytes).replaceAll("/", "_").replaceAll("+", "-
"); |
2756 } | 2783 } |
2757 /** Timestamp in seconds for valid login token. */ | 2784 /** Timestamp in seconds for valid login token. */ |
2758 core.String validSince; | 2785 core.String validSince; |
2759 /** Version of the user's password. */ | 2786 /** Version of the user's password. */ |
2760 core.int version; | 2787 core.int version; |
2761 | 2788 |
2762 UserInfo(); | 2789 UserInfo(); |
2763 | 2790 |
2764 UserInfo.fromJson(core.Map _json) { | 2791 UserInfo.fromJson(core.Map _json) { |
| 2792 if (_json.containsKey("createdAt")) { |
| 2793 createdAt = _json["createdAt"]; |
| 2794 } |
2765 if (_json.containsKey("disabled")) { | 2795 if (_json.containsKey("disabled")) { |
2766 disabled = _json["disabled"]; | 2796 disabled = _json["disabled"]; |
2767 } | 2797 } |
2768 if (_json.containsKey("displayName")) { | 2798 if (_json.containsKey("displayName")) { |
2769 displayName = _json["displayName"]; | 2799 displayName = _json["displayName"]; |
2770 } | 2800 } |
2771 if (_json.containsKey("email")) { | 2801 if (_json.containsKey("email")) { |
2772 email = _json["email"]; | 2802 email = _json["email"]; |
2773 } | 2803 } |
2774 if (_json.containsKey("emailVerified")) { | 2804 if (_json.containsKey("emailVerified")) { |
2775 emailVerified = _json["emailVerified"]; | 2805 emailVerified = _json["emailVerified"]; |
2776 } | 2806 } |
| 2807 if (_json.containsKey("lastLoginAt")) { |
| 2808 lastLoginAt = _json["lastLoginAt"]; |
| 2809 } |
2777 if (_json.containsKey("localId")) { | 2810 if (_json.containsKey("localId")) { |
2778 localId = _json["localId"]; | 2811 localId = _json["localId"]; |
2779 } | 2812 } |
2780 if (_json.containsKey("passwordHash")) { | 2813 if (_json.containsKey("passwordHash")) { |
2781 passwordHash = _json["passwordHash"]; | 2814 passwordHash = _json["passwordHash"]; |
2782 } | 2815 } |
2783 if (_json.containsKey("passwordUpdatedAt")) { | 2816 if (_json.containsKey("passwordUpdatedAt")) { |
2784 passwordUpdatedAt = _json["passwordUpdatedAt"]; | 2817 passwordUpdatedAt = _json["passwordUpdatedAt"]; |
2785 } | 2818 } |
2786 if (_json.containsKey("photoUrl")) { | 2819 if (_json.containsKey("photoUrl")) { |
2787 photoUrl = _json["photoUrl"]; | 2820 photoUrl = _json["photoUrl"]; |
2788 } | 2821 } |
2789 if (_json.containsKey("providerUserInfo")) { | 2822 if (_json.containsKey("providerUserInfo")) { |
2790 providerUserInfo = _json["providerUserInfo"].map((value) => new UserInfoPr
oviderUserInfo.fromJson(value)).toList(); | 2823 providerUserInfo = _json["providerUserInfo"].map((value) => new UserInfoPr
oviderUserInfo.fromJson(value)).toList(); |
2791 } | 2824 } |
2792 if (_json.containsKey("salt")) { | 2825 if (_json.containsKey("salt")) { |
2793 salt = _json["salt"]; | 2826 salt = _json["salt"]; |
2794 } | 2827 } |
2795 if (_json.containsKey("validSince")) { | 2828 if (_json.containsKey("validSince")) { |
2796 validSince = _json["validSince"]; | 2829 validSince = _json["validSince"]; |
2797 } | 2830 } |
2798 if (_json.containsKey("version")) { | 2831 if (_json.containsKey("version")) { |
2799 version = _json["version"]; | 2832 version = _json["version"]; |
2800 } | 2833 } |
2801 } | 2834 } |
2802 | 2835 |
2803 core.Map toJson() { | 2836 core.Map toJson() { |
2804 var _json = new core.Map(); | 2837 var _json = new core.Map(); |
| 2838 if (createdAt != null) { |
| 2839 _json["createdAt"] = createdAt; |
| 2840 } |
2805 if (disabled != null) { | 2841 if (disabled != null) { |
2806 _json["disabled"] = disabled; | 2842 _json["disabled"] = disabled; |
2807 } | 2843 } |
2808 if (displayName != null) { | 2844 if (displayName != null) { |
2809 _json["displayName"] = displayName; | 2845 _json["displayName"] = displayName; |
2810 } | 2846 } |
2811 if (email != null) { | 2847 if (email != null) { |
2812 _json["email"] = email; | 2848 _json["email"] = email; |
2813 } | 2849 } |
2814 if (emailVerified != null) { | 2850 if (emailVerified != null) { |
2815 _json["emailVerified"] = emailVerified; | 2851 _json["emailVerified"] = emailVerified; |
2816 } | 2852 } |
| 2853 if (lastLoginAt != null) { |
| 2854 _json["lastLoginAt"] = lastLoginAt; |
| 2855 } |
2817 if (localId != null) { | 2856 if (localId != null) { |
2818 _json["localId"] = localId; | 2857 _json["localId"] = localId; |
2819 } | 2858 } |
2820 if (passwordHash != null) { | 2859 if (passwordHash != null) { |
2821 _json["passwordHash"] = passwordHash; | 2860 _json["passwordHash"] = passwordHash; |
2822 } | 2861 } |
2823 if (passwordUpdatedAt != null) { | 2862 if (passwordUpdatedAt != null) { |
2824 _json["passwordUpdatedAt"] = passwordUpdatedAt; | 2863 _json["passwordUpdatedAt"] = passwordUpdatedAt; |
2825 } | 2864 } |
2826 if (photoUrl != null) { | 2865 if (photoUrl != null) { |
(...skipping 504 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3331 } | 3370 } |
3332 if (refreshToken != null) { | 3371 if (refreshToken != null) { |
3333 _json["refreshToken"] = refreshToken; | 3372 _json["refreshToken"] = refreshToken; |
3334 } | 3373 } |
3335 if (registered != null) { | 3374 if (registered != null) { |
3336 _json["registered"] = registered; | 3375 _json["registered"] = registered; |
3337 } | 3376 } |
3338 return _json; | 3377 return _json; |
3339 } | 3378 } |
3340 } | 3379 } |
OLD | NEW |