Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions internal/products.go
Original file line number Diff line number Diff line change
Expand Up @@ -146,6 +146,9 @@ func requestProductsFromRegCodeOrSystem(data SUSEConnectData, regCode string,
req.URL.Path = "/connect/systems/products"
auth := url.UserPassword(credentials.Username, credentials.Password)
req.URL.User = auth
if credentials.SystemToken != "" {
req.Header.Add("System-Token", credentials.SystemToken)
}
}

resp, err := client.Do(req)
Expand Down
3 changes: 3 additions & 0 deletions internal/subscriptions.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,9 @@ func requestRegcodes(data SUSEConnectData, credentials Credentials) ([]string, e
req.URL.Path = "/connect/systems/subscriptions"

auth := url.UserPassword(credentials.Username, credentials.Password)
if credentials.SystemToken != "" {
req.Header.Add("System-Token", credentials.SystemToken)
}
req.URL.User = auth

resp, err := client.Do(req)
Expand Down