auth

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetAuthHeader

func GetAuthHeader() (string, error)

GetAuthHeader returns the authorization header value Precedence: LINCTL_API_KEY env var > config file

func Login

func Login(plaintext, jsonOut bool) error

Login handles the authentication flow

func Logout

func Logout() error

Logout clears stored credentials

Types

type AuthConfig

type AuthConfig struct {
	APIKey string `json:"api_key,omitempty"`
}

type User

type User struct {
	ID        string `json:"id"`
	Name      string `json:"name"`
	Email     string `json:"email"`
	AvatarURL string `json:"avatarUrl,omitempty"`
}

func GetCurrentUser

func GetCurrentUser() (*User, error)

GetCurrentUser returns the current authenticated user

Jump to

Keyboard shortcuts

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