Documentation
¶
Index ¶
Constants ¶
View Source
const ( // Default ClickUp OAuth app credentials. These can be overridden via config. DefaultClientID = "" DefaultClientSecret = "" )
Variables ¶
This section is empty.
Functions ¶
func ClearToken ¶
func ClearToken() error
ClearToken removes stored credentials from keyring and file.
func GetAuthMethod ¶
func GetAuthMethod() string
GetAuthMethod returns the authentication method used ("oauth" or "token").
func GetAuthURL ¶
GetAuthURL returns the authorization URL for the OAuth flow.
func OAuthFlow ¶
OAuthFlow performs the OAuth 2.0 authorization code flow using a local HTTP server.
func StoreToken ¶
StoreToken saves the API token to the OS keyring, falling back to plaintext.
Types ¶
type AuthUser ¶
type AuthUser struct {
ID int `json:"id"`
Username string `json:"username"`
Email string `json:"email"`
ProfilePicture string `json:"profilePicture"`
}
AuthUser represents the authenticated ClickUp user.
func ValidateToken ¶
ValidateToken checks that a token is valid by calling the ClickUp API. Returns the authenticated user info on success.
type OAuthResult ¶
OAuthResult holds the result of an OAuth flow.
Click to show internal directories.
Click to hide internal directories.