question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Authenticate backend raise error when used with other authentication.

See original GitHub issue

my authenticate settings

AUTHENTICATION_BACKENDS = (
    'django.contrib.auth.backends.ModelBackend',  # default
    'django_cas_ng.backends.CASBackend',
    'django_python3_ldap.auth.LDAPBackend',
)

and I use the default login view in django_cas_ng which pass 3 arguments to authenticate function (request, ticket, service but not password) . if I’m not logged in, django authenticate will check all authenticate backends.

In this time, ldap authenticate will raise error because it does not pass a password.

password = kwargs.pop("password")

It should be changed to

password = kwargs.pop("password", None)

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
etianencommented, Feb 9, 2021

Released as 0.11.4. 😃

On Fri, 5 Feb 2021 at 10:28, Dave Hall dave@etianen.com wrote:

I’ll get a release out today, no worries 😃

Thanks for your patience.

On Sun, 31 Jan 2021 at 05:17, Axieum notifications@github.com wrote:

Hey @etianen https://github.com/etianen, can we get this version released to pip asap?! It’s preventing use with Django rest framework and OAuth2 authentication.

Also, thank you for this very convenient library 😊

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/etianen/django-python3-ldap/issues/175#issuecomment-770328490, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEKCGKWVLETBAGU2MRFM3S4TRXDANCNFSM4J3WUB5A .

1reaction
etianencommented, Feb 5, 2021

I’ll get a release out today, no worries 😃

Thanks for your patience.

On Sun, 31 Jan 2021 at 05:17, Axieum notifications@github.com wrote:

Hey @etianen https://github.com/etianen, can we get this version released to pip asap?! It’s preventing use with Django rest framework and OAuth2 authentication.

Also, thank you for this very convenient library 😊

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/etianen/django-python3-ldap/issues/175#issuecomment-770328490, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEKCGKWVLETBAGU2MRFM3S4TRXDANCNFSM4J3WUB5A .

Read more comments on GitHub >

github_iconTop Results From Across the Web

Django - Error Message in Custom Auth Backend
You can raise a django ValidationError from django.core.exceptions import ValidationError raise ValidationError("Some custom message").
Read more >
Customizing authentication in Django
If a backend raises a PermissionDenied exception, authentication will immediately fail. Django won't check the backends that follow. Note. Once a user has ......
Read more >
Authenticate with a backend server - Google Developers
The ID token is properly signed by Google. Use Google's public keys (available in JWK or PEM format) to verify the token's signature....
Read more >
DEFAULT_AUTHENTICATION_...
We are using JWT for our backend auth and Oauth2 for external connections, the problem we have is that if one authentication backend...
Read more >
Admin Authentication API Errors | Firebase - Google
The credential used to initialize the Admin SDK has insufficient permission to access the requested Authentication resource. Refer to Set up a Firebase...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found