auth

package
v0.2.3 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2021 License: MPL-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const WeGOGithubClientID = "edcb13588d46f254052c"

Uniquely identifies us as a GitHub app. This does not need to be obfuscated because it is publicly available to anyone who does an OAuth request via wego. See the auth ADR for more details: https://github.com/weaveworks/weave-gitops/blob/main/doc/adr/0005-wego-core-auth-strategy.md#design

Variables

View Source
var ErrAuthPending = errors.New("auth pending")

Functions

This section is empty.

Types

type AuthProvider

type AuthProvider interface {
	DoCLIAuth(ctx context.Context, stdout io.Writer) (string, error)
}

type BlockingCLIAuthHandler

type BlockingCLIAuthHandler func(context.Context, io.Writer) (string, error)

BlockingCLIAuthHandler takes over the terminal experience and returns a token when the user completes the flow.

func NewGithubDeviceFlowHandler

func NewGithubDeviceFlowHandler(client *http.Client) BlockingCLIAuthHandler

NewGithubDeviceFlowHandler returns a function which will initiate the Github Device Flow for the CLI.

Jump to

Keyboard shortcuts

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