File tree Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Expand file tree Collapse file tree 1 file changed +8
-1
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,9 @@ class CredentialProvider:
10
10
def get_credentials (self ) -> Union [Tuple [str ], Tuple [str , str ]]:
11
11
raise NotImplementedError ("get_credentials must be implemented" )
12
12
13
+ async def get_credentials_async (self ) -> Union [Tuple [str ], Tuple [str , str ]]:
14
+ raise NotImplementedError ("get_credentials_async must be implemented" )
15
+
13
16
14
17
class StreamingCredentialProvider (CredentialProvider , ABC ):
15
18
"""
@@ -34,7 +37,6 @@ def is_streaming(self) -> bool:
34
37
pass
35
38
36
39
37
-
38
40
class UsernamePasswordCredentialProvider (CredentialProvider ):
39
41
"""
40
42
Simple implementation of CredentialProvider that just wraps static
@@ -49,3 +51,8 @@ def get_credentials(self):
49
51
if self .username :
50
52
return self .username , self .password
51
53
return (self .password ,)
54
+
55
+ async def get_credentials_async (self ) -> Union [Tuple [str ], Tuple [str , str ]]:
56
+ if self .username :
57
+ return self .username , self .password
58
+ return (self .password ,)
You can’t perform that action at this time.
0 commit comments