From 59c63f28de30d0799c2761d585b12407d3ad786b Mon Sep 17 00:00:00 2001 From: Jakub K Date: Fri, 12 Jan 2024 14:35:51 +0100 Subject: [PATCH] oauth2 start --- izaac/settings.py | 2 ++ izaac/urls.py | 1 + requirements.txt | 3 ++- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/izaac/settings.py b/izaac/settings.py index 18d8b68..eeff15d 100644 --- a/izaac/settings.py +++ b/izaac/settings.py @@ -43,6 +43,7 @@ REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': [ 'rest_framework.authentication.SessionAuthentication', 'rest_framework.authentication.TokenAuthentication', + ], 'DEFAULT_PERMISSION_CLASSES': [ 'rest_framework.permissions.IsAuthenticated', @@ -69,6 +70,7 @@ INSTALLED_APPS = [ 'dj_rest_auth.registration', "core", "jobposting", + 'oauth2_provider', ] SITE_ID = 1 diff --git a/izaac/urls.py b/izaac/urls.py index d6540f6..412bffc 100644 --- a/izaac/urls.py +++ b/izaac/urls.py @@ -20,4 +20,5 @@ urlpatterns = [ path("admin/", admin.site.urls), path("api/user/", include('core.urls')), path("api/jobposting/", include('jobposting.urls')), + path('o/', include('oauth2_provider.urls', namespace='oauth2_provider')), ] diff --git a/requirements.txt b/requirements.txt index 822c930..29d760f 100644 --- a/requirements.txt +++ b/requirements.txt @@ -5,4 +5,5 @@ psycopg2-binary django-allauth dj-rest-auth django-cors-headers -Pillow \ No newline at end of file +Pillow +django-oauth-toolkit \ No newline at end of file