clientctx

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithUpdatedRequest

func WithUpdatedRequest(ctx context.Context, fn func(req *http.Request) error) context.Context

WithUpdatedRequest returns a context that wraps the current OAuth2 HTTP client with a function that can amend a request in flight.

The API provided by the OAuth2 package is not sufficient for some applications. For example, the OAuth2 package does not provide a way to specify multiple audiences or resources for a request per RFC 8693.

func WithUpdatedRequestBody

func WithUpdatedRequestBody(ctx context.Context, fn func(body []byte) ([]byte, error)) context.Context

WithUpdatedRequestBody returns a context that wraps the current OAuth2 HTTP client with a function that can amend the body of a request in flight.

Types

This section is empty.

Jump to

Keyboard shortcuts

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