auth

package
v0.20.0 Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2026 License: MPL-2.0 Imports: 10 Imported by: 1 module, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package auth implements the authentication flow for the CLI

Index

Constants

View Source
const (
	ZeaburApiKeyConfirmEndpoint = constant.ZeaburDashURL + "/auth/api-key/confirm"
)

Zeabur "API Key Confirmation" endpoint constants

Variables

This section is empty.

Functions

This section is empty.

Types

type CallbackServer

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

func NewCallbackServer

func NewCallbackServer() (*CallbackServer, error)

func (*CallbackServer) Close

func (s *CallbackServer) Close() error

func (*CallbackServer) GetCallbackURL

func (s *CallbackServer) GetCallbackURL() string

func (*CallbackServer) Port

func (s *CallbackServer) Port() int

func (*CallbackServer) Serve

func (s *CallbackServer) Serve() error

func (*CallbackServer) WaitForToken

func (s *CallbackServer) WaitForToken(ctx context.Context) (TokenResponse, error)

type Client

type Client interface {
	GenerateToken(ctx context.Context) (string, error)
}

type ImplicitFlowClient

type ImplicitFlowClient struct {
	Endpoint url.URL
	// contains filtered or unexported fields
}

func NewImplicitFlowClient

func NewImplicitFlowClient(callbackServer *CallbackServer) *ImplicitFlowClient

func (*ImplicitFlowClient) GenerateToken

func (c *ImplicitFlowClient) GenerateToken(ctx context.Context) (token string, err error)

type TokenResponse

type TokenResponse struct {
	Token string
	State string
}

Jump to

Keyboard shortcuts

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