Documentation
¶
Overview ¶
Package auth provides authentication utilities for the AhaSend CLI.
This package handles client authentication through multiple methods:
- Global API key flags (--api-key and --account-id)
- Profile-based authentication from configuration files
- Profile switching and validation
The main function GetAuthenticatedClient creates authenticated clients for use by CLI commands, handling the authentication precedence and validation automatically.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetAuthenticatedClient ¶
func GetAuthenticatedClient(cmd *cobra.Command) (client.AhaSendClient, error)
GetAuthenticatedClient returns an authenticated AhaSend client It checks for global flags first, then falls back to profiles
func RequireAuth ¶
RequireAuth validates that authentication is available
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.