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

authcode

package
v1.36.4 Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2026 License: Apache-2.0 Imports: 11 Imported by: 6

Documentation

Index

Constants

View Source
const BrowserSuccessHTML = `` /* 515-byte string literal not displayed */

BrowserSuccessHTML is the success page on browser based authentication.

Variables

This section is empty.

Functions

func BrowserRedirectHTML

func BrowserRedirectHTML(target string) string

Types

type Browser

type Browser struct {
	Browser browser.Interface
	Logger  logger.Interface
}

Browser provides the authentication code flow using the browser.

func (*Browser) Do

func (u *Browser) Do(ctx context.Context, o *BrowserOption, oidcClient client.Interface) (*oidc.TokenSet, error)

type BrowserOption

type BrowserOption struct {
	SkipOpenBrowser            bool
	BrowserCommand             string
	BindAddress                []string
	AuthenticationTimeout      time.Duration
	OpenURLAfterAuthentication string
	AuthRequestExtraParams     map[string]string
	LocalServerCertFile        string
	LocalServerKeyFile         string
}

type Keyboard

type Keyboard struct {
	Reader reader.Interface
	Logger logger.Interface
}

Keyboard provides the authorization code flow with keyboard interactive.

func (*Keyboard) Do

func (u *Keyboard) Do(ctx context.Context, o *KeyboardOption, oidcClient client.Interface) (*oidc.TokenSet, error)

type KeyboardOption

type KeyboardOption struct {
	AuthRequestExtraParams map[string]string
}

Jump to

Keyboard shortcuts

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