ClearToken clears the cached authentication token, forcing re-authentication on next use. This method is useful when you know the current token is invalid (e.g., after receiving 401 responses) or when you want to force a fresh authentication. The method is thread-safe and can be called from multipl
()
| 369 | // // Next request will re-authenticate |
| 370 | // } |
| 371 | func (am *AuthManager) ClearToken() { |
| 372 | am.mu.Lock() |
| 373 | defer am.mu.Unlock() |
| 374 | am.authToken = nil |
| 375 | am.logger.Debug("Authentication token cleared") |
| 376 | } |
| 377 | |
| 378 | // IsTokenAuth returns true if the authentication manager is configured for API token authentication. |
| 379 | // |