internal

package
v0.23.0 Latest Latest
Warning

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

Go to latest
Published: Jun 17, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

View Source
const TokenEnvVar = "OBOT_TOKEN"

Variables

This section is empty.

Functions

func AppURLForAPIBaseURL added in v0.22.0

func AppURLForAPIBaseURL(baseURL string) (string, error)

AppURLForAPIBaseURL returns the app URL that owns credentials for an API base URL.

func ExistingToken added in v0.23.0

func ExistingToken(ctx context.Context, baseURL string) (string, error)

func Logout added in v0.22.0

func Logout(appURL string) (bool, error)

Logout removes the keyring token for appURL. It returns false when no token was stored for the URL.

func StoredTokenValid added in v0.22.0

func StoredTokenValid(ctx context.Context, appURL string) (bool, error)

StoredTokenValid reports whether a stored token for appURL authenticates successfully. It never initiates login or prompts for user input.

func Token

func Token(ctx context.Context, baseURL string, opts apiclient.TokenFetchOptions) (string, error)

func WithNonInteractive added in v0.22.0

func WithNonInteractive(ctx context.Context) context.Context

WithNonInteractive marks ctx as safe for GUI orchestration: token acquisition must not prompt or read from stdin.

func WithOutputWriter added in v0.22.0

func WithOutputWriter(ctx context.Context, w io.Writer) context.Context

WithOutputWriter routes token-acquisition user messages to w. They default to stderr to keep stdout reserved for machine-readable output like `login --print-token`.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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