Help us shape the future of Go! Take the 2026 Go Developer Survey

oauth2

package
v1.106.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConfigTokenSource

func NewConfigTokenSource(cfg config.Config, httpClient *http.Client, protocol, hostname string) (oauth2.TokenSource, error)

func StartDeviceFlow added in v1.98.0

func StartDeviceFlow(ctx context.Context, cfg config.Config, out io.Writer, httpClient *http.Client, hostname string) (string, error)

StartDeviceFlow performs the OAuth 2.0 Device Authorization Grant (RFC 8628). It displays a one-time user code and verification URL, polls the token endpoint until the user completes authorization on a separate device, then persists the resulting token using the same on-disk shape as StartFlow.

func StartFlow

func StartFlow(ctx context.Context, cfg config.Config, out io.Writer, httpClient *http.Client, hostname string) (string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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