Skip to content

Commit 01b749e

Browse files
committed
fix: updated the code to ensure compatibility with Python 3.9
1 parent 2674d36 commit 01b749e

File tree

3 files changed

+5
-2
lines changed

3 files changed

+5
-2
lines changed

zitadel_client/auth/oauth_authenticator.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,7 @@ def __init__(self, host: str):
9292
9393
:param host: The base URL for the OAuth provider.
9494
"""
95+
super().__init__()
9596
self.open_id = OpenId(host)
9697
self.auth_scopes = {"openid", "urn:zitadel:iam:org:project:id:zitadel:aud"}
9798

zitadel_client/auth/open_id.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,15 @@ class OpenId:
1717
token_endpoint: str
1818

1919
def __init__(self, hostname: str):
20+
# noinspection HttpUrlsUsage
2021
if not (hostname.startswith("http://") or hostname.startswith("https://")):
2122
hostname = "https://" + hostname
2223

2324
self.host_endpoint = hostname
2425
well_known_url = self.build_well_known_url(hostname)
2526

2627
try:
28+
# noinspection HttpUrlsUsage
2729
if not well_known_url.lower().startswith(("http://", "https://")):
2830
raise ValueError("Invalid URL scheme. Only 'http' and 'https' are allowed.")
2931

zitadel_client/auth/web_token_authenticator.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ def __init__(
2929
private_key: str,
3030
jwt_lifetime: timedelta = timedelta(hours=1),
3131
jwt_algorithm: str = "RS256",
32-
key_id: str | None = None,
32+
key_id: Optional[str] = None,
3333
):
3434
"""
3535
Constructs a JWTAuthenticator.
@@ -195,6 +195,6 @@ def build(self) -> WebTokenAuthenticator:
195195
key_id=self.key_id,
196196
)
197197

198-
def key_identifier(self, key_id: str | None) -> "WebTokenAuthenticatorBuilder":
198+
def key_identifier(self, key_id: Optional[str]) -> "WebTokenAuthenticatorBuilder":
199199
self.key_id = key_id
200200
return self

0 commit comments

Comments
 (0)