Skip to content

Commit 6db939b

Browse files
e1senh0rnhashhar
authored andcommitted
Fix typing of kerberos mutual_authentication
1 parent 126d041 commit 6db939b

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

trino/auth.py

+10-2
Original file line numberDiff line numberDiff line change
@@ -50,11 +50,15 @@ def get_exceptions(self) -> Tuple[Any, ...]:
5050

5151

5252
class KerberosAuthentication(Authentication):
53+
MUTUAL_REQUIRED = 1
54+
MUTUAL_OPTIONAL = 2
55+
MUTUAL_DISABLED = 3
56+
5357
def __init__(
5458
self,
5559
config: Optional[str] = None,
5660
service_name: Optional[str] = None,
57-
mutual_authentication: bool = False,
61+
mutual_authentication: int = MUTUAL_REQUIRED,
5862
force_preemptive: bool = False,
5963
hostname_override: Optional[str] = None,
6064
sanitize_mutual_error_response: bool = True,
@@ -117,11 +121,15 @@ def __eq__(self, other: object) -> bool:
117121

118122

119123
class GSSAPIAuthentication(Authentication):
124+
MUTUAL_REQUIRED = 1
125+
MUTUAL_OPTIONAL = 2
126+
MUTUAL_DISABLED = 3
127+
120128
def __init__(
121129
self,
122130
config: Optional[str] = None,
123131
service_name: Optional[str] = None,
124-
mutual_authentication: bool = False,
132+
mutual_authentication: int = MUTUAL_DISABLED,
125133
force_preemptive: bool = False,
126134
hostname_override: Optional[str] = None,
127135
sanitize_mutual_error_response: bool = True,

0 commit comments

Comments
 (0)