NewAuthManagerWithToken creates a new authentication manager for API token authentication. This method sets up the manager to use Proxmox API tokens for stateless authentication. API tokens don't require session management and are recommended for automated systems and service accounts. Parameters:
(httpClient *HTTPClient, token string, logger interfaces.Logger)
| 173 | // log.Fatal("Authentication failed:", err) |
| 174 | // } |
| 175 | func NewAuthManagerWithToken(httpClient *HTTPClient, token string, logger interfaces.Logger) *AuthManager { |
| 176 | return &AuthManager{ |
| 177 | httpClient: httpClient, |
| 178 | token: token, |
| 179 | logger: logger, |
| 180 | } |
| 181 | } |
| 182 | |
| 183 | // EnsureAuthenticated ensures the client is properly authenticated and ready for API calls. |
| 184 | // |
no outgoing calls