auth

package
v1.55.0 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrProjectIDNotFound = errors.New("project is inaccessible. You either don't have access to this project or the project doesn't exist")
	ErrOrgIDNotFound     = errors.New("organization is inaccessible. You don't have access to this organization or the organization doesn't exist")
)
View Source
var ErrUnauthenticated = errors.New("not logged in")

Functions

func AccountWithAccessToken

func AccountWithAccessToken() (string, error)

func Builder

func Builder() *cobra.Command

func LoginBuilder

func LoginBuilder() *cobra.Command

func LogoutBuilder

func LogoutBuilder() *cobra.Command

func RegisterBuilder

func RegisterBuilder() *cobra.Command

func WhoAmIBuilder

func WhoAmIBuilder() *cobra.Command

Types

type ConfigDeleter

type ConfigDeleter interface {
	Delete() error
}

type LoginConfig

type LoginConfig interface {
	config.SetSaver
	AccessTokenSubject() (string, error)
}

type LoginOpts

type LoginOpts struct {
	cli.DefaultSetterOpts
	cli.RefresherOpts
	AccessToken  string
	RefreshToken string
	IsGov        bool

	NoBrowser  bool
	SkipConfig bool
	// contains filtered or unexported fields
}

func (*LoginOpts) LoginPreRun

func (opts *LoginOpts) LoginPreRun(ctx context.Context) func() error

func (*LoginOpts) LoginRun

func (opts *LoginOpts) LoginRun(ctx context.Context) error

func (*LoginOpts) SyncWithOAuthAccessProfile

func (opts *LoginOpts) SyncWithOAuthAccessProfile(c LoginConfig) func() error

SyncWithOAuthAccessProfile returns a function that is synchronizing the oauth settings from a login config profile with the provided command opts.

type RegisterOpts

type RegisterOpts struct {
	LoginOpts
}

func (*RegisterOpts) RegisterRun

func (opts *RegisterOpts) RegisterRun(ctx context.Context) error

type Revoker

type Revoker interface {
	RevokeToken(context.Context, string, string) (*atlas.Response, error)
}

Jump to

Keyboard shortcuts

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