Skip to content
Snippets Groups Projects
Verified Commit f3f8c8e6 authored by Frank Sauerburger's avatar Frank Sauerburger
Browse files

Set up token auth

parent aa3d0975
Branches 10-basic-ui
No related tags found
1 merge request!3Resolve "Augment user object and OIDC"
......@@ -30,4 +30,4 @@ class PlotSet(CreateModelMixin,
viewsets.GenericViewSet):
queryset = Plot.objects.all()
serializer_class = PlotSerializer
permission_classes = []
permission_classes = [permissions.IsAuthenticated]
......@@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'rest_framework.authtoken',
'uhepp_vault',
'uhepp_api',
'django.contrib.admin',
......@@ -42,6 +43,14 @@ INSTALLED_APPS = [
'rest_framework',
]
REST_FRAMEWORK = {
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework.authentication.TokenAuthentication',
'rest_framework.authentication.BasicAuthentication',
'rest_framework.authentication.SessionAuthentication',
]
}
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
......
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