File tree Expand file tree Collapse file tree 1 file changed +4
-5
lines changed
google/cloud/sql/connector Expand file tree Collapse file tree 1 file changed +4
-5
lines changed Original file line number Diff line number Diff line change @@ -150,11 +150,8 @@ async def _get_ephemeral(
150150 request = google .auth .transport .requests .Request ()
151151 credentials .refresh (request )
152152
153- # TODO: remove this once issue with OAuth2 Tokens is resolved.
154- # See https://github.com/GoogleCloudPlatform/cloud-sql-python-connector/issues/137
155-
156153 headers = {
157- "Authorization" : f"Bearer { credentials .token . rstrip ( '.' ) } " ,
154+ "Authorization" : f"Bearer { credentials .token } " ,
158155 }
159156
160157 url = "https://www.googleapis.com/sql/{}/projects/{}/instances/{}/createEphemeral" .format (
@@ -164,7 +161,9 @@ async def _get_ephemeral(
164161 data = {"public_key" : pub_key }
165162
166163 if enable_iam_auth :
167- data ["access_token" ] = credentials .token
164+ # TODO: remove this once issue with OAuth2 Tokens is resolved.
165+ # See https://github.com/GoogleCloudPlatform/cloud-sql-python-connector/issues/137
166+ data ["access_token" ] = credentials .token .rstrip ('.' )
168167
169168 resp = await client_session .post (
170169 url , headers = headers , json = data , raise_for_status = True
You can’t perform that action at this time.
0 commit comments