From 5bf0ad65382ff00138aa0a80d0fe29f345586413 Mon Sep 17 00:00:00 2001 From: Damon River Date: Sat, 15 Mar 2025 15:06:56 -0500 Subject: [PATCH] Fix typing of kerberos mutual_authentication --- trino/auth.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/trino/auth.py b/trino/auth.py index c2155fd1..12456ba4 100644 --- a/trino/auth.py +++ b/trino/auth.py @@ -50,11 +50,15 @@ def get_exceptions(self) -> Tuple[Any, ...]: class KerberosAuthentication(Authentication): + MUTUAL_REQUIRED = 1 + MUTUAL_OPTIONAL = 2 + MUTUAL_DISABLED = 3 + def __init__( self, config: Optional[str] = None, service_name: Optional[str] = None, - mutual_authentication: bool = False, + mutual_authentication: int = MUTUAL_REQUIRED, force_preemptive: bool = False, hostname_override: Optional[str] = None, sanitize_mutual_error_response: bool = True, @@ -117,11 +121,15 @@ def __eq__(self, other: object) -> bool: class GSSAPIAuthentication(Authentication): + MUTUAL_REQUIRED = 1 + MUTUAL_OPTIONAL = 2 + MUTUAL_DISABLED = 3 + def __init__( self, config: Optional[str] = None, service_name: Optional[str] = None, - mutual_authentication: bool = False, + mutual_authentication: int = MUTUAL_DISABLED, force_preemptive: bool = False, hostname_override: Optional[str] = None, sanitize_mutual_error_response: bool = True,