Closed luqmansen closed 8 months ago
All modified and coverable lines are covered by tests :white_check_mark:
Comparison is base (
dd7b062
) 91.70% compared to head (0a5b184
) 91.70%. Report is 2 commits behind head on develop.:exclamation: Current head 0a5b184 differs from pull request most recent head 4015993. Consider uploading reports for the commit 4015993 to get more accurate results
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@luqmansen Thank you for your contribution! :grin:
@johnraz I think we can use GitHub's Squash and Merge
feature to merge these changes in. :wink:
@giovannicimolin indeed that would give the same result, we just need to make sure the commit message is proper 😊
Hi @johnraz, I have dropped the unneeded commit, thank you for reviewing :adore:
Description
As titled, seems like the
TokenAuthentication
class already defined a method to retrieve the header, yet not utilized within the class itself.ref: the related method
Similar technique has been done in
rest_framework
Token Authentication (though, using class attribute)Impact
These changes allows the auth header to be overridden from the subclass without having to override the
authenticate()
method (just for small auth prefix header changes) or meddling with global settings forknox_settings.AUTH_HEADER_PREFIX
(because it might be used somewhere else within the project)example usage:
without these changes, the subclass needs to: