Skip to content

Commit

Permalink
added descriptor object to Account class
Browse files Browse the repository at this point in the history
  • Loading branch information
sandeepsuryaprasad committed Dec 5, 2024
1 parent ab400cc commit 50a4a73
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion py/selenium/webdriver/common/fedcm/account.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ def __get__(self, obj, cls) -> Optional[str]:
return obj._account_data.get(self.name)

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


class Account:
Expand All @@ -41,6 +41,17 @@ class Account:
See: https://w3c-fedid.github.io/FedCM/#dictdef-identityprovideraccount
https://w3c-fedid.github.io/FedCM/#webdriver-accountlist
"""

account_id = _AccountDescriptor("accountId")
email = _AccountDescriptor("email")
name = _AccountDescriptor("name")
given_name = _AccountDescriptor("givenName")
picture_url = _AccountDescriptor("pictureUrl")
idp_config_url = _AccountDescriptor("idpConfigUrl")
terms_of_service_url = _AccountDescriptor("termsOfServiceUrl")
privacy_policy_url = _AccountDescriptor("privacyPolicyUrl")
login_state = _AccountDescriptor("loginState")

account_id = _AccountDescriptor("accountId")
email = _AccountDescriptor("email")
name = _AccountDescriptor("name")
Expand Down

0 comments on commit 50a4a73

Please sign in to comment.