Discover Packages
github.com/dorkitude/linctl
pkg
auth
package
Version:
v0.1.9
Opens a new window with list of versions in this module.
Published: May 23, 2026
License: MIT
Opens a new window with license information.
Imports: 12
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
GetAuthHeader returns the authorization header value.
Precedence: LINCTL_API_KEY env var > pass (when LINCTL_PASS_NAME set) > config file.
Login handles the authentication flow
Logout clears stored credentials. When LINCTL_PASS_NAME is set, the pass
entry is removed; the legacy JSON file is also removed if present so a
future re-login starts from a clean slate.
type AuthConfig struct {
APIKey string `json:"api_key,omitempty"`
}
type User struct {
ID string `json:"id"`
Name string `json:"name"`
Email string `json:"email"`
AvatarURL string `json:"avatarUrl,omitempty"`
}
GetCurrentUser returns the current authenticated user
Source Files
¶
Click to show internal directories.
Click to hide internal directories.