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

Simplifies authentication #1923

Closed
wants to merge 1 commit into from
Closed

Conversation

wiltonsr
Copy link

@wiltonsr wiltonsr commented Nov 26, 2024

- Remove Authenticate and isDeprecatedUserParamError methods
- Using the Zabbix API version determines the use of Login or LoginDeprecated
- This will prevent errors login in old Zabbix 3 as reported in grafana#1616
@wiltonsr wiltonsr requested a review from a team as a code owner November 26, 2024 18:47
@CLAassistant
Copy link

CLAassistant commented Nov 26, 2024

CLA assistant check
All committers have signed the CLA.

@ivanahuckova ivanahuckova self-assigned this Jan 20, 2025
Copy link
Member

@ivanahuckova ivanahuckova left a comment

Choose a reason for hiding this comment

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

@wiltonsr there has been some changes related to support of zabbix v7. The zabbix.api.Authenticate now accepts version, so you could just use your code in that method.

if zabbix.version >= 54 {
		auth, err = zabbix.api.Login(ctx, zabbixLogin, zabbixPassword)
	} else {
		auth, err = zabbix.api.LoginDeprecated(ctx, zabbixLogin, zabbixPassword)
	}

@wiltonsr wiltonsr closed this Jan 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
Status: Complete
Development

Successfully merging this pull request may close these issues.

4 participants