login

package
v1.19.4 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InteractiveLogin

func InteractiveLogin(ctx context.Context, config *config.Config) error

InteractiveLogin lets the user set configuration on the command line

func Login

func Login(ctx context.Context, baseURL string, config *config.Config) error

Login is the main entrypoint for logging in to the CLI.

func SuccessMessage added in v0.2.2

func SuccessMessage(ctx context.Context, account *acct.Account, baseURL string, apiKey string) (string, error)

SuccessMessage returns the display message for a successfully authenticated user

Types

type AsyncInputReader added in v1.12.4

type AsyncInputReader interface {
	// contains filtered or unexported methods
}

AsyncInputReader is an interface that has an async version of scanln

type AsyncStdinReader added in v1.12.4

type AsyncStdinReader struct {
}

AsyncStdinReader implements scanln(ch chan int), an async version of scanln

type Authenticator added in v1.13.12

type Authenticator struct {
	// contains filtered or unexported fields
}

Authenticator handles the login flow

func NewAuthenticator added in v1.13.12

func NewAuthenticator(keytransfer keys.KeyTransfer) *Authenticator

NewAuthenticator creates a new authenticator object

func (*Authenticator) Login added in v1.13.12

func (a *Authenticator) Login(ctx context.Context, links *Links) error

Login function is used to obtain credentials via stripe dashboard.

type Links struct {
	BrowserURL       string `json:"browser_url"`
	PollURL          string `json:"poll_url"`
	VerificationCode string `json:"verification_code"`
}

Links provides the URLs for the CLI to continue the login flow

func GetLinks(ctx context.Context, baseURL string, deviceName string) (*Links, error)

GetLinks provides the URLs for the CLI to continue the login flow

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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