From 8052152ea589bbf148b4ce76b03e1273d781f000 Mon Sep 17 00:00:00 2001 From: Alexandre Iooss Date: Mon, 21 Sep 2020 11:03:07 +0200 Subject: [PATCH] Add OAuth2 endpoints --- note.cron | 2 ++ note_kfet/settings/base.py | 1 + note_kfet/urls.py | 3 +++ 3 files changed, 6 insertions(+) diff --git a/note.cron b/note.cron index 078856ea..44db347a 100644 --- a/note.cron +++ b/note.cron @@ -20,3 +20,5 @@ 55 6 * * * root cd /var/www/note_kfet && env/bin/python manage.py send_reports # Mettre à jour les boutons mis en avant 00 9 * * * root cd /var/www/note_kfet && env/bin/python manage.py refresh_highlighted_buttons +# Vider les tokens Oauth2 + 00 6 * * * root cd /var/www/note_kfet && env/bin/python manage.py cleartokens diff --git a/note_kfet/settings/base.py b/note_kfet/settings/base.py index 27010fef..3c2cd4f9 100644 --- a/note_kfet/settings/base.py +++ b/note_kfet/settings/base.py @@ -35,6 +35,7 @@ INSTALLED_APPS = [ 'mailer', 'phonenumber_field', 'polymorphic', + 'oauth2_provider', # Django contrib 'django.contrib.admin', diff --git a/note_kfet/urls.py b/note_kfet/urls.py index 74731a62..6049bfde 100644 --- a/note_kfet/urls.py +++ b/note_kfet/urls.py @@ -32,6 +32,9 @@ urlpatterns = [ path('api/', include('api.urls')), path('permission/', include('permission.urls')), + # OAuth2 provider + path('o/', include('oauth2_provider.urls', namespace='oauth2_provider')), + # Make coffee path('coffee/', include('django_htcpcp_tea.urls')), ]