Skip to content

Commit 50a4a73

Browse files
added descriptor object to Account class
1 parent ab400cc commit 50a4a73

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

py/selenium/webdriver/common/fedcm/account.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ def __get__(self, obj, cls) -> Optional[str]:
3232
return obj._account_data.get(self.name)
3333

3434
def __set__(self, obj, value) -> None:
35-
raise AttributeError(f"Cannot set readonly attribute")
35+
raise AttributeError(f"Cannot set readonly attribute")
3636

3737

3838
class Account:
@@ -41,6 +41,17 @@ class Account:
4141
See: https://w3c-fedid.github.io/FedCM/#dictdef-identityprovideraccount
4242
https://w3c-fedid.github.io/FedCM/#webdriver-accountlist
4343
"""
44+
45+
account_id = _AccountDescriptor("accountId")
46+
email = _AccountDescriptor("email")
47+
name = _AccountDescriptor("name")
48+
given_name = _AccountDescriptor("givenName")
49+
picture_url = _AccountDescriptor("pictureUrl")
50+
idp_config_url = _AccountDescriptor("idpConfigUrl")
51+
terms_of_service_url = _AccountDescriptor("termsOfServiceUrl")
52+
privacy_policy_url = _AccountDescriptor("privacyPolicyUrl")
53+
login_state = _AccountDescriptor("loginState")
54+
4455
account_id = _AccountDescriptor("accountId")
4556
email = _AccountDescriptor("email")
4657
name = _AccountDescriptor("name")

0 commit comments

Comments
 (0)