Opened 9 years ago

Closed 5 years ago

#6490 closed New feature (fixed)

Accept variable keyword args in authentication

Reported by: Bastian Kleineidam <calvin@…> Owned by: nobody
Component: contrib.auth Version: master
Severity: Normal Keywords:
Cc: Triage Stage: Design decision needed
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


Currently authentication functions accept username and password,
but some authentication algorithms may require other types
of credentials (such as public keys or ip addresses).
Thus the authenticate() function should accept variable keyword
arguments to allow such constructs.

Attachments (1)

0018-Accept-variable-keyword-args-in-authentication.patch (1.1 KB) - added by Bastian Kleineidam <calvin@…> 9 years ago.

Download all attachments as: .zip

Change History (8)

Changed 9 years ago by Bastian Kleineidam <calvin@…>

comment:1 Changed 9 years ago by Jacob

Needs documentation: unset
Needs tests: unset
Patch needs improvement: unset
Triage Stage: UnreviewedDesign decision needed

comment:2 Changed 8 years ago by Piotr Lewandowski <django@…>

Component: UncategorizedAuthentication

comment:3 Changed 6 years ago by Julien Phalip

Type: New feature

comment:4 Changed 5 years ago by Julien Phalip

Severity: Normal

comment:5 Changed 5 years ago by Carl Meyer

Easy pickings: unset
Resolution: wontfix
Status: newclosed
UI/UX: unset

This is already addressed. Auth backends' authenticate methods can accept any credentials. The main django.contrib.auth.authenticate() function accepts arbitrary keyword argument credentials and catches the TypeError if the credentials are wrong for a given backend.

comment:6 Changed 5 years ago by Carl Meyer

Resolution: wontfix
Status: closedreopened

comment:7 Changed 5 years ago by Carl Meyer

Resolution: fixed
Status: reopenedclosed

Sorry, wrong resolution, reclosing as fixed.

Note: See TracTickets for help on using tickets.
Back to Top