package headers

import "cloud.google.com/go/auth/internal/transport/headers"

Index

Functions

func SetAuthHeader

func SetAuthHeader(token *auth.Token, req *http.Request)

SetAuthHeader uses the provided token to set the Authorization and trust boundary headers on a request. If the token.Type is empty, the type is assumed to be Bearer.

func SetAuthMetadata

func SetAuthMetadata(token *auth.Token, m map[string]string)

SetAuthMetadata uses the provided token to set the Authorization and trust boundary metadata. If the token.Type is empty, the type is assumed to be Bearer.

Source Files

headers.go

Version
v0.20.0 (latest)
Published
Apr 6, 2026
Platform
linux/amd64
Imports
3 packages
Last checked
19 minutes ago

Tools for package owners.