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

SocialAuthBackend only needs to authenticated #475

Merged
merged 1 commit into from
Sep 27, 2012
Merged

SocialAuthBackend only needs to authenticated #475

merged 1 commit into from
Sep 27, 2012

Conversation

garrypolley
Copy link
Contributor

In attempting to get this library to work with a permissions backend it kept failing because SociaAuthBackend was inheriting from the django.contrib.auth.backends.ModelBackend. The default Django AuthBackend assumes SQL. Since this application does both SQL and Mongo it should not make the same assumptions.

The SocialAuthBackend only needs to implement authenticate, since it only does authentication. Since it defines authenticate as a method, it's fine to inherit from object rather than the django model auth backend.

I've tested this change against a few backends for SQL and Mongo and not had any issues. Since tests are manual though, I recommend doing some as well.

for reference

https://docs.djangoproject.com/en/dev/topics/auth/#authentication-backends

omab added a commit that referenced this pull request Sep 27, 2012
SocialAuthBackend only needs to authenticated
@omab omab merged commit 4a722d7 into omab:master Sep 27, 2012
@omab
Copy link
Owner

omab commented Sep 27, 2012

Thanks

@garrypolley
Copy link
Contributor Author

Thank you for the quick pull request merge.

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.

None yet

2 participants