Documentation
¶
Overview ¶
Package login implements Stripe authentication flows.
Index ¶
- func InitiateLogin(ctx context.Context, baseURL string, cfg *config.Config) error
- func InteractiveLogin(ctx context.Context, config *config.Config) error
- func Login(ctx context.Context, baseURL string, config *config.Config) error
- func PollForLogin(ctx context.Context, pollURL string, cfg *config.Config) error
- func SuccessMessage(ctx context.Context, account *acct.Account, baseURL string, apiKey string) (string, error)
- type AsyncInputReader
- type AsyncStdinReader
- type Authenticator
- type Links
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitiateLogin ¶ added in v1.39.0
InitiateLogin calls GetLinks, prints JSON with browser_url, verification_code, and a next_step command to complete login, then exits. Intended for non-interactive (agent/script) use.
func InteractiveLogin ¶
InteractiveLogin lets the user set configuration on the command line
func PollForLogin ¶ added in v1.39.0
PollForLogin polls the given poll URL until browser auth completes, then saves credentials. Intended as the second step of a non-interactive login flow.
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
Source Files
¶
Directories
¶
| Path | Synopsis |
|---|---|
|
Package acct provides Stripe account retrieval during login.
|
Package acct provides Stripe account retrieval during login. |
|
Package keys handles API key retrieval and configuration during login.
|
Package keys handles API key retrieval and configuration during login. |