Skip to content

Commit

Permalink
make (Session)setTicket private
Browse files Browse the repository at this point in the history
  • Loading branch information
camaeel committed Nov 23, 2024
1 parent 8eee42e commit ea0560e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion proxmox/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -137,8 +137,10 @@ func (c *Client) SetAPIToken(userID, token string) {
// Parameters:
// - `ticket`
// - `csrfPreventionToken`
//
// Docs: https://pve.proxmox.com/wiki/Proxmox_VE_API#Authentication
func (c *Client) SetTicket(ticket, csrfPreventionToken string) {
c.session.SetTicket(ticket, csrfPreventionToken)
c.session.setTicket(ticket, csrfPreventionToken)
}

func (c *Client) Login(username string, password string, otp string) (err error) {
Expand Down
2 changes: 1 addition & 1 deletion proxmox/session.go
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ func (s *Session) SetAPIToken(userID, token string) {
s.AuthToken = auth
}

func (s *Session) SetTicket(ticket, csrfPreventionToken string) {
func (s *Session) setTicket(ticket, csrfPreventionToken string) {
s.AuthTicket = ticket
s.CsrfToken = csrfPreventionToken
}
Expand Down

0 comments on commit ea0560e

Please sign in to comment.