auth

package
v0.0.0-...-4f32763 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigPath

func GetConfigPath() (string, error)

func Login

func Login(options LoginOptions) error

func Logout

func Logout() error

func NewClient

func NewClient() (*endgame.Client, error)

func NewHTTPClient

func NewHTTPClient() (*http.Client, error)

func Save

func Save(config Config) error

func SupportsDeviceLogin

func SupportsDeviceLogin() (bool, error)

func SyncToolsCache

func SyncToolsCache() (int, error)

Types

type Config

type Config struct {
	OAuth *OAuthConfig `json:"oauth,omitempty"`
}

func Load

func Load() (*Config, error)

type LoginOptions

type LoginOptions struct {
	Mode         string
	OpenBrowser  bool
	CallbackHost string
	CallbackPort int
}

type OAuthConfig

type OAuthConfig struct {
	ClientID    string     `json:"client_id,omitempty"`
	RedirectURI string     `json:"redirect_uri,omitempty"`
	TokenURL    string     `json:"token_url,omitempty"`
	Token       OAuthToken `json:"token"`
}

type OAuthToken

type OAuthToken struct {
	AccessToken  string    `json:"access_token,omitempty"`
	TokenType    string    `json:"token_type,omitempty"`
	RefreshToken string    `json:"refresh_token,omitempty"`
	Expiry       time.Time `json:"expiry,omitempty"`
}

type Status

type Status struct {
	Email   string
	OrgID   string
	OrgName string
}

func Verify

func Verify() (*Status, error)

Jump to

Keyboard shortcuts

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