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 ImplicitFlowClient ¶
func NewImplicitFlowClient ¶
func NewImplicitFlowClient(callbackServer *CallbackServer) *ImplicitFlowClient
func (*ImplicitFlowClient) GenerateToken ¶
func (c *ImplicitFlowClient) GenerateToken(ctx context.Context) (token string, err error)
type TokenResponse ¶
Click to show internal directories.
Click to hide internal directories.