auth

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Overview

Package auth implements the device-code login flow against the cloud API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Credentials

type Credentials struct {
	Token  string
	UserID string
}

Credentials are the platform credentials produced by a successful login.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service performs Volcano authentication workflows.

func NewService

func NewService(deps cliruntime.Deps) Service

NewService returns an authentication service.

func (Service) LoginWithBrowser

func (s Service) LoginWithBrowser(ctx context.Context, cfg *config.Config, w io.Writer) (Credentials, error)

LoginWithBrowser runs the OAuth device flow and returns credentials to persist.

func (Service) LoginWithToken

func (s Service) LoginWithToken(ctx context.Context, cfg *config.Config, token string) (Credentials, error)

LoginWithToken validates token and returns credentials to persist.

func (Service) Logout

func (s Service) Logout() error

Logout deletes local authentication state.

Jump to

Keyboard shortcuts

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