Skip to content

add configuration for user authentication #279

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

Merged
merged 3 commits into from
Aug 21, 2020

Conversation

t-io
Copy link
Contributor

@t-io t-io commented Jul 30, 2020

No description provided.

@Andrew-Chen-Wang
Copy link
Member

@t-io Thanks for the PR! Do you mind adding documentation in the SETTINGS section? If you don't mind adding a test for a different authentication scheme as well? Honestly you don't need to do the latter. I ran the test suite and everything passed, so it LGTM!

Ping @davesque 124 passed, 7 warnings in 2.75s Warnings are from Django 4.0 deprecation.

Copy link
Member

@davesque davesque left a comment

Choose a reason for hiding this comment

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

A little late, but maybe someone could submit a PR to correct the issue that I mention.

@@ -24,6 +24,7 @@
'AUTH_HEADER_TYPES': ('Bearer',),
'USER_ID_FIELD': 'id',
'USER_ID_CLAIM': 'user_id',
'USER_AUTHENTICATION_RULE': 'rest_framework_simplejwt.authentication.default_user_authentication_rule',
Copy link
Member

Choose a reason for hiding this comment

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

@Andrew-Chen-Wang @t-io

If we add this setting name to rest_framework_simplejwt.settings.IMPORT_STRINGS, we won't need to do the string splitting and importlib stuff in rest_framework_simplejwt/serializers.py.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants