From 76d1784aeabfa65f96f429593f0ea7ca0d3092c6 Mon Sep 17 00:00:00 2001 From: Yohann D'ANELLO Date: Tue, 9 Mar 2021 09:44:25 +0100 Subject: [PATCH] Add OAuth2 authentication for Django Rest Framework Signed-off-by: Yohann D'ANELLO --- note_kfet/settings/base.py | 1 + 1 file changed, 1 insertion(+) diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py index 23bfe118..67948f09 100644 --- a/note_kfet/settings/base.py +++ b/note_kfet/settings/base.py @@ -239,6 +239,7 @@ REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': [ 'rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.TokenAuthentication', + 'oauth2_provider.contrib.rest_framework.OAuth2Authentication', ], 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.PageNumberPagination', 'PAGE_SIZE': 20,