From d40931ad5b15a21ac6fcbab606e9c03cf9946590 Mon Sep 17 00:00:00 2001 From: Roberto Rosario Date: Wed, 9 Jul 2014 16:45:42 -0400 Subject: [PATCH] Add basic authentification --- mayan/settings.py | 20 ++++---------------- 1 file changed, 4 insertions(+), 16 deletions(-) diff --git a/mayan/settings.py b/mayan/settings.py index 46f1c303a1..8670588e47 100644 --- a/mayan/settings.py +++ b/mayan/settings.py @@ -266,22 +266,10 @@ REST_FRAMEWORK = { 'PAGINATE_BY': 10, 'PAGINATE_BY_PARAM': 'page_size', 'MAX_PAGINATE_BY': 100, -} -# ---------- Swagger --------------- -SWAGGER_SETTINGS = { - #"exclude_namespaces": [], # List URL namespaces to ignore - #"api_version": '0.1', # Specify your API's version - #"api_path": "/", # Specify the path to your API not a root level - #"enabled_methods": [ # Specify which methods to enable in Swagger UI - # 'get', - # 'post', - # 'put', - # 'patch', - # 'delete' - #], - #"api_key": '', # An API key - #"is_authenticated": False, # Set to True to enforce user authentication, - #"is_superuser": False, # Set to True to enforce admin only access + 'DEFAULT_AUTHENTICATION_CLASSES': ( + 'rest_framework.authentication.BasicAuthentication', + 'rest_framework.authentication.SessionAuthentication', + ) } try: