auth

package
v3.31.1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Overview

Package auth handles commands related to authentication via the CLI

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoginWithToken added in v3.31.0

func LoginWithToken(f *factory.Factory, org, token string) error

LoginWithToken stores a token for an organization. Keychain is preferred. Config file is used when keychain is unavailable or not writable.

Types

type LoginCmd

type LoginCmd struct {
	Scopes string `help:"OAuth scopes to request" default:""`
	Org    string `help:"Organization slug (required with --token)" optional:""`
	Token  string `help:"API token to store (non-OAuth login)" optional:""`
}

func (*LoginCmd) Help

func (c *LoginCmd) Help() string

func (*LoginCmd) Run

func (c *LoginCmd) Run(kongCtx *kong.Context, globals cli.GlobalFlags) error

type LogoutCmd

type LogoutCmd struct {
	All bool   `help:"Log out of all organizations" xor:"target"`
	Org string `help:"Organization slug (defaults to currently selected organization)" optional:"" xor:"target"`
}

func (*LogoutCmd) Run

func (c *LogoutCmd) Run(kongCtx *kong.Context, globals cli.GlobalFlags) error

type StatusCmd added in v3.30.0

type StatusCmd struct {
	output.OutputFlags
}

func (*StatusCmd) Help added in v3.30.0

func (c *StatusCmd) Help() string

func (*StatusCmd) Run added in v3.30.0

func (c *StatusCmd) Run(kongCtx *kong.Context, globals cli.GlobalFlags) error

type StatusOutput added in v3.30.0

type StatusOutput struct {
	OrganizationSlug string                `json:"organization_slug"`
	Token            buildkite.AccessToken `json:"token"`
}

func (StatusOutput) TextOutput added in v3.30.0

func (w StatusOutput) TextOutput() string

type SwitchCmd added in v3.31.0

type SwitchCmd struct {
	OrganizationSlug string `arg:"" optional:"" help:"Organization slug to switch"`
}

func (*SwitchCmd) Help added in v3.31.0

func (c *SwitchCmd) Help() string

func (*SwitchCmd) Run added in v3.31.0

func (c *SwitchCmd) Run(globals cli.GlobalFlags) error

Jump to

Keyboard shortcuts

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