auth

package
v0.5.1 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Login

func Login(commandCtx context.Context, opts LoginOptions) error

Login authenticates through a browser using PKCE and stores the resulting token. Browser launch failure leaves the authorization URL available for manual use.

func Logout

func Logout(ctx context.Context) error

Logout removes stored credentials after best-effort server revocation. An already absent token is not an error.

func Refresh

func Refresh(ctx context.Context) error

Refresh exchanges the stored refresh token for new credentials and saves them.

func Status

func Status(ctx context.Context, opts StatusOptions) error

Status reports stored or environment authentication and available server validation.

Types

type LoginOptions

type LoginOptions struct{ Timeout int }

LoginOptions sets the browser callback timeout in seconds.

type StatusOptions

type StatusOptions struct{ JSON bool }

StatusOptions selects JSON output for authentication status.

Jump to

Keyboard shortcuts

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