auth

package
v3.7.1 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2026 License: Apache-2.0 Imports: 33 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DebugSSOLogHandler

func DebugSSOLogHandler(ctx *cmdctx.Ctx) error

DebugSSOLogHandler force-refreshes the SSO token, then for every log key of an execution prints a ready-to-paste curl command followed by a truncated preview of firing that request in-process. Because refresh and fetch happen back-to-back the inline calls never hit the ~2min token expiry; the printed curl is minted fresh each run so it can be copy/pasted and retried by hand.

func EnvHandler

func EnvHandler(ctx *cmdctx.Ctx) error

func LoginHandler

func LoginHandler(ctx *cmdctx.Ctx) error

func LogoutHandler

func LogoutHandler(ctx *cmdctx.Ctx) error

func ProfilesFetchFn

func ProfilesFetchFn(ctx *cmdctx.Ctx, _ *spec.EndpointSpec, _, _ int, _ any) (*cmdctx.PageResult, error)

func SSORefreshHandler

func SSORefreshHandler(ctx *cmdctx.Ctx) error

func SSOStatusHandler

func SSOStatusHandler(ctx *cmdctx.Ctx) error

func SetHandler

func SetHandler(ctx *cmdctx.Ctx) error

func StatusHandler

func StatusHandler(ctx *cmdctx.Ctx) error

func TokenHandler

func TokenHandler(ctx *cmdctx.Ctx) error

Types

type SetWizardInput

type SetWizardInput struct {
	APIURL    string
	Token     string
	AccountID string
	AuthType  pkgauth.AuthType
	RegURL    string
	OrgID     string
	ProjectID string
}

SetWizardInput carries the pre-filled credentials and current defaults for RunSetWizard.

type WizardExisting

type WizardExisting struct {
	APIURL    string
	Token     string
	OrgID     string
	ProjectID string
	// OtherURLs lists API URLs already saved across all profiles, offered
	// as quick-pick options alongside APIURL.
	OtherURLs []string
}

WizardExisting carries values from an already-saved profile so the wizard can offer "use existing" options instead of requiring re-entry.

type WizardResult

type WizardResult struct {
	APIURL       string
	Token        string
	Account      string
	RegURL       string
	OrgID        string
	Project      string
	ScopeNotSet  bool // true when org/project not configured — caller should prompt setscope
	ScopeSkipped bool // true when user explicitly chose to save without selecting org/project
	SSOSelected  bool // true when the user chose "Login with SSO" — no other fields are set
}

WizardResult is returned by RunLoginWizard on success.

func RunLoginWizard

func RunLoginWizard(ctx *cmdctx.Ctx, existing *WizardExisting) (*WizardResult, error)

RunLoginWizard runs the interactive TUI and returns the collected values. Pass existing profile values so the wizard can offer "use existing" options. Returns (nil, nil) if the user canceled.

func RunSetWizard

func RunSetWizard(ctx *cmdctx.Ctx, in *SetWizardInput) (*WizardResult, error)

RunSetWizard starts the wizard at the org-pick step using already-validated credentials. Pre-selects the currently saved org and project. Returns (nil, nil) if canceled.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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