@@ -55,6 +55,9 @@ def getDriverSystemConfiguration(cls) -> DriverSystemConfiguration:
5555 @staticmethod
5656 def get_auth_mechanism (auth_provider ):
5757 """Get the auth mechanism for the auth provider."""
58+ # AuthMech is an enum with the following values:
59+ # PAT, DATABRICKS_OAUTH, EXTERNAL_AUTH, CLIENT_CERT
60+
5861 if not auth_provider :
5962 return None
6063 if isinstance (auth_provider , AccessTokenAuthProvider ):
@@ -65,11 +68,14 @@ def get_auth_mechanism(auth_provider):
6568 return (
6669 AuthMech .EXTERNAL_AUTH
6770 ) # External identity provider (AWS, Azure, etc.)
68- return AuthMech .OTHER # Custom or unknown authentication provider
71+ return AuthMech .CLIENT_CERT # Client certificate (ssl)
6972
7073 @staticmethod
7174 def get_auth_flow (auth_provider ):
7275 """Get the auth flow for the auth provider."""
76+ # AuthFlow is an enum with the following values:
77+ # TOKEN_PASSTHROUGH, BROWSER_BASED_AUTHENTICATION
78+
7379 if not auth_provider :
7480 return None
7581
@@ -78,7 +84,6 @@ def get_auth_flow(auth_provider):
7884 return (
7985 AuthFlow .TOKEN_PASSTHROUGH
8086 ) # Has existing tokens, no user interaction needed
81-
8287 if hasattr (auth_provider , "oauth_manager" ):
8388 return (
8489 AuthFlow .BROWSER_BASED_AUTHENTICATION
0 commit comments