Dear All, i'm developing a multi-tenant application where it would be extremely handy to have the request object in my custom authentication backend available, so i went ahead and started to use the /1.11a,/ version, which already has the commit:
4b9330c Fixed #25187 -- Made request available in authentication backends. I'm using the contrib.auth.views.LoginView view for my login form, nothing special here, it works properly except for using the 'request' object in my backend's authenticate() method. After some trials and debugging for me it seems that 'request' object couldn't make its way to my authenticate() method: while contrib.auth.views.LoginView still has its 'self.request' set, it's not passed to its form_class 'contrib.auth.forms.AuthenticationForm' (its self.request is None), so when the actual authenticate() method is called from the AuthenticationForm class at contrib/auth/forms.py #187, always None passed as parameter 'request'. As i'm rather new to the Django internals, i'm on uncharted territory here: is it possible that it's a bug in the implementation, or it's more like that i missed something obvious? Thanks in advance, regards -- Zoltan Gyarmati https://zgyarmati.de -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/05ee6d9a-71d7-ade5-9d51-9dd05a1e505a%40gmail.com. For more options, visit https://groups.google.com/d/optout.
signature.asc
Description: OpenPGP digital signature