Opened 7 years ago

Closed 4 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

Description

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@…> 7 years ago.

Download all attachments as: .zip

Change History (8)

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

comment:1 Changed 7 years ago by jacob

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Triage Stage changed from Unreviewed to Design decision needed

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

  • Component changed from Uncategorized to Authentication

comment:3 Changed 4 years ago by julien

  • Type set to New feature

comment:4 Changed 4 years ago by julien

  • Severity set to Normal

comment:5 Changed 4 years ago by carljm

  • Easy pickings unset
  • Resolution set to wontfix
  • Status changed from new to closed
  • 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 4 years ago by carljm

  • Resolution wontfix deleted
  • Status changed from closed to reopened

comment:7 Changed 4 years ago by carljm

  • Resolution set to fixed
  • Status changed from reopened to closed

Sorry, wrong resolution, reclosing as fixed.

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