1717import requests
1818import requests .auth
1919
20- from ._base_client import _BaseClient , fix_host_if_needed
20+ from ._base_client import _BaseClient , _fix_host_if_needed
2121
2222# Error code for PKCE flow in Azure Active Directory, that gets additional retry.
2323# See https://stackoverflow.com/a/75466778/277035 for more info
@@ -245,7 +245,7 @@ def get_account_endpoints(host: str, account_id: str, client: _BaseClient = _Bas
245245 :param account_id: The account ID.
246246 :return: The account's OIDC endpoints.
247247 """
248- host = fix_host_if_needed (host )
248+ host = _fix_host_if_needed (host )
249249 oidc = f'{ host } /oidc/accounts/{ account_id } /.well-known/oauth-authorization-server'
250250 resp = client .do ('GET' , oidc )
251251 return OidcEndpoints .from_dict (resp )
@@ -257,7 +257,7 @@ def get_workspace_endpoints(host: str, client: _BaseClient = _BaseClient()) -> O
257257 :param host: The Databricks workspace host.
258258 :return: The workspace's OIDC endpoints.
259259 """
260- host = fix_host_if_needed (host )
260+ host = _fix_host_if_needed (host )
261261 oidc = f'{ host } /oidc/.well-known/oauth-authorization-server'
262262 resp = client .do ('GET' , oidc )
263263 return OidcEndpoints .from_dict (resp )
@@ -271,7 +271,7 @@ def get_azure_entra_id_workspace_endpoints(host: str) -> Optional[OidcEndpoints]
271271 :return: The OIDC endpoints for the workspace's Azure Entra ID tenant.
272272 """
273273 # In Azure, this workspace endpoint redirects to the Entra ID authorization endpoint
274- host = fix_host_if_needed (host )
274+ host = _fix_host_if_needed (host )
275275 res = requests .get (f'{ host } /oidc/oauth2/v2.0/authorize' , allow_redirects = False )
276276 real_auth_url = res .headers .get ('location' )
277277 if not real_auth_url :
0 commit comments