jazzband / django-two-factor-auth

Complete Two-Factor Authentication for Django providing the easiest integration into most Django projects.
MIT License
1.71k stars 448 forks source link

Remove backported salted_hmac use django provided one instead #602

Closed sevdog closed 1 year ago

sevdog commented 1 year ago

Description

Removes salted_hmac_256 from the codebase, replacing with django.utils.crypto.salted_hmac.

Also a small tweak: using tuple instead of list when there is no need to modify a sequence which is only needed to match an array-like API.

Motivation and Context

As stated in #601: this package now has a minimum requirements for django>=3.2, thus the backported method salted_hmac_256 is not required anymore as we can rely on salted_hmac from django.

How Has This Been Tested?

Types of changes

Checklist:

claudep commented 1 year ago

I think a last improvement could be to reference the issue in the commit message (Fixes #601 or something like that) so it will auto-close.

sevdog commented 1 year ago

Done.