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

Fix incorrect method override in authentication plugin example #1692

Merged
merged 1 commit into from
Feb 7, 2025

Conversation

raguilar127
Copy link
Contributor

The documentation originally instructed overriding login() when implementing a custom authentication plugin. However, BaseAuth.login() performs additional preprocessing before calling _login(), which is the method intended for authentication logic.

Overriding login() directly causes a 'Too many values to unpack' error during a PROPFIND request, as login() is expected to return multiple values in a tuple. This PR updates the example to correctly override _login() instead.

Reference: BaseAuth.login() marked as final and calls _login()

Corrected the method override in the authentication plugin example. The original example suggested overriding login(), but BaseAuth expects _login() to be implemented instead. Overriding login() causes a Too many values to unpack error.
Copy link
Collaborator

@pbiering pbiering left a comment

Choose a reason for hiding this comment

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

thank you

@pbiering pbiering added this to the 3.4.2 milestone Feb 7, 2025
@pbiering pbiering merged commit d79abc2 into Kozea:master Feb 7, 2025
19 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants