-
-
Notifications
You must be signed in to change notification settings - Fork 215
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
Conversation
I'm very much in favor of this. |
@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. |
There was a problem hiding this 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
@@ -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' |
There was a problem hiding this comment.
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'
😉
There was a problem hiding this comment.
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.
nice work 👍 |
Make auth header prefix configurable
Inspired by #19