Skip to content
Merged
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
9 changes: 6 additions & 3 deletions cmd/poll_ywh.go
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,12 @@ var pollYwhCmd = &cobra.Command{
if proxy != "" {
whttp.SetupProxy(proxy)
}
// Validate auth: require either token OR (email+password+otp-secret)
if token == "" && (email == "" || password == "" || otpSecret == "") {
utils.Log.Error("yeswehack requires either token or email+password+otp-secret")
// Auth is optional: the public API serves public programs unauthenticated.
// A token or email+password+otp-secret is only needed for private programs.
if token == "" && email == "" && password == "" && otpSecret == "" {
utils.Log.Info("No YesWeHack credentials provided; polling public programs unauthenticated")
} else if token == "" && (email == "" || password == "" || otpSecret == "") {
utils.Log.Error("yeswehack authenticated mode requires either token or email+password+otp-secret")
return nil
}

Expand Down
Loading