authentication

package
v1.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 7, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IDTokenTokenSource

func IDTokenTokenSource(ctx context.Context, audience string) (oauth2.TokenSource, error)

IDTokenTokenSource returns an oauth2.TokenSource that fetches an identity token.

Types

type AuthTransport

type AuthTransport struct {
	Transport http.RoundTripper
	Audience  string
}

AuthTransport is an http.RoundTripper that adds an Authorization header with an identity token.

func (*AuthTransport) RoundTrip

func (t *AuthTransport) RoundTrip(req *http.Request) (*http.Response, error)

RoundTrip executes a single HTTP transaction and adds the Authorization header.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL