IsUsingTokenAuth returns true if the client is using API token authentication.
()
| 127 | |
| 128 | // IsUsingTokenAuth returns true if the client is using API token authentication. |
| 129 | func (c *Client) IsUsingTokenAuth() bool { |
| 130 | // Check if the auth manager is using token authentication |
| 131 | // Token auth users have a '!' in their username (e.g., "user@realm!tokenid") |
| 132 | return c.authManager != nil && c.authManager.IsTokenAuth() |
| 133 | } |
| 134 | |
| 135 | // GetBaseURL returns the base URL of the Proxmox API. |
| 136 | func (c *Client) GetBaseURL() string { |