MCPcopy Create free account
hub / github.com/devnullvoid/pvetui / IsValid

Method IsValid

pkg/api/auth.go:100–102  ·  view source on GitHub ↗

IsValid checks if the authentication token is still valid and not expired. Returns true if the token exists, has a non-empty ticket, and the current time is before the expiration time. This method is safe to call on nil tokens. Example usage: if token != nil && token.IsValid() { // Use existin

()

Source from the content-addressed store, hash-verified

98// // Need to re-authenticate
99// }
100func (t *AuthToken) IsValid() bool {
101 return t != nil && t.Ticket != "" && time.Now().Before(t.ExpiresAt)
102}
103
104// AuthManager handles Proxmox API authentication with support for both
105// password-based and API token authentication methods.

Calls

no outgoing calls