File tree Expand file tree Collapse file tree 1 file changed +11
-0
lines changed
Expand file tree Collapse file tree 1 file changed +11
-0
lines changed Original file line number Diff line number Diff line change @@ -898,13 +898,24 @@ class CredentialWrapper(credentials.Base):
898898
899899 def __init__ (self , token ):
900900 self ._delegate = google .oauth2 .credentials .Credentials (token )
901+ self ._delegate_async = google .oauth2 ._credentials_async .Credentials (token )
901902
902903 def get_credential (self ):
903904 return self ._delegate
904905
906+ def get_credential_async (self ):
907+ return self ._delegate_async
908+
905909 @classmethod
906910 def from_existing_credential (cls , google_cred ):
907911 if not google_cred .token :
908912 request = transport .requests .Request ()
909913 google_cred .refresh (request )
910914 return CredentialWrapper (google_cred .token )
915+
916+ @classmethod
917+ async def from_existing_credential_async (cls , google_cred ):
918+ if not google_cred .token :
919+ request = transport ._aiohttp_requests .Request ()
920+ await google_cred .refresh (request )
921+ return CredentialWrapper (google_cred .token )
You can’t perform that action at this time.
0 commit comments