Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit ff864e1

Browse filesBrowse files
authored
docs(samples): fix the header format (GoogleCloudPlatform#7098)
1 parent b07624e commit ff864e1
Copy full SHA for ff864e1

File tree

Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+4
-1
lines changed

‎iam/api-client/workload_identity_federation.py

Copy file name to clipboardExpand all lines: iam/api-client/workload_identity_federation.py
+4-1Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,8 +42,11 @@ def create_token_aws(project_id: str, pool_id: str, provider_id: str) -> None:
4242
token = {
4343
"url": request.url,
4444
"method": request.method,
45-
"headers": request.headers.items()
45+
"headers": []
4646
}
47+
for key, value in request.headers.items():
48+
token["headers"].append({"key": key, "value": value})
49+
4750
# The token lets workload identity federation verify the identity without revealing the AWS secret access key.
4851
print("Token:\n%s" % json.dumps(token, indent=2, sort_keys=True))
4952
print("URL encoded token:\n%s" % urllib.parse.quote(json.dumps(token)))

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.