Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add basic auth support #83

Closed
wants to merge 1 commit into from

Conversation

verbotenj
Copy link
Contributor

No description provided.

Signed-off-by: Ales Verbic <verbotenj@gmail.com>
Copy link
Member

@wolf31o2 wolf31o2 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Move the parameters to plugin.go

if webhookPlugin, ok := output.(*webhook.WebhookOutput); ok {
webhookPlugin.SetBasicAuth(cfg.Auth.Username, cfg.Auth.Password)
}
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Plugins shouldn't affect the main function.

type BasicAuth struct {
Username string `yaml:"username" envconfig:"BASIC_AUTH_USERNAME"`
Password string `yaml:"password" envconfig:"BASIC_AUTH_PASSWORD"`
}
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this. Any configuration should be reserved for the correct plugin. This should be configured in the plugin's configuration.

@verbotenj
Copy link
Contributor Author

Same PR without the fork

@verbotenj verbotenj closed this Sep 22, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants