Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make auth header prefix configurable #127

Merged
merged 4 commits into from
Oct 12, 2018
Merged

Conversation

qpfmtlcp
Copy link
Contributor

@qpfmtlcp qpfmtlcp commented Oct 9, 2018

Inspired by #19

@johnraz
Copy link
Collaborator

johnraz commented Oct 9, 2018

I'm very much in favor of this.

@belugame
Copy link
Collaborator

@qpfmtlcp thank you for your contribution. I'm happy to add this. Please add test coverage, as in a unit test that confirms one can successfully login with the right prefix and not with the wrong prefix.

Copy link
Collaborator

@johnraz johnraz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a small typo in the test case, otherwise LGTM :shipit:

@@ -44,6 +44,9 @@ def get_basic_auth_header(username, password):
user_serializer_knox = knox_settings.defaults.copy()
user_serializer_knox["USER_SERIALIZER"] = UserSerializer

auth_header_prefix_knox = knox_settings.defaults.copy()
auth_header_prefix_knox["AUTH_HEADER_PREFIX"] = 'Baerer'
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the sake of correctness this should be 'Bearer' 😉

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

oops. I really appreciate your review.

@belugame
Copy link
Collaborator

nice work 👍
we sadly still cannot release anything to pypi due to #107

@belugame belugame merged commit 0e42503 into jazzband:develop Oct 12, 2018
dontexit pushed a commit to dontexit/django-rest-knox that referenced this pull request Jan 24, 2024
Make auth header prefix configurable
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants