Skip to content
Snippets Groups Projects
Verified Commit 76d1784a authored by ynerant's avatar ynerant
Browse files

Add OAuth2 authentication for Django Rest Framework


Signed-off-by: ynerant's avatarYohann D'ANELLO <ynerant@crans.org>
parent 56c5fa40
No related branches found
No related tags found
3 merge requests!162Bugs mineurs, documentation,!157[Invoices] Product quantities can be floating,!155CAS + OAuth2
Pipeline #8887 passed with warnings with stages
in 10 minutes and 4 seconds
...@@ -239,6 +239,7 @@ REST_FRAMEWORK = { ...@@ -239,6 +239,7 @@ REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [ 'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.SessionAuthentication',
'rest_framework.authentication.TokenAuthentication', 'rest_framework.authentication.TokenAuthentication',
'oauth2_provider.contrib.rest_framework.OAuth2Authentication',
], ],
'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination',
'PAGE_SIZE': 20, 'PAGE_SIZE': 20,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment