|
177 | 177 | REST_FRAMEWORK = { |
178 | 178 | 'DATETIME_FORMAT': DRYCC_DATETIME_FORMAT, |
179 | 179 | 'DEFAULT_MODEL_SERIALIZER_CLASS': 'rest_framework.serializers.ModelSerializer', |
180 | | - 'DEFAULT_PERMISSION_CLASSES': ( |
| 180 | + 'DEFAULT_PERMISSION_CLASSES': [ |
181 | 181 | 'rest_framework.permissions.IsAuthenticated', |
182 | | - ), |
183 | | - 'DEFAULT_RENDERER_CLASSES': ( |
| 182 | + ], |
| 183 | + 'DEFAULT_AUTHENTICATION_CLASSES': [ |
| 184 | + 'rest_framework.authentication.SessionAuthentication', |
| 185 | + 'oauth2_provider.contrib.rest_framework.OAuth2Authentication', |
| 186 | + ], |
| 187 | + 'DEFAULT_RENDERER_CLASSES': [ |
184 | 188 | 'rest_framework.renderers.JSONRenderer', |
185 | | - ), |
| 189 | + ], |
186 | 190 | 'DEFAULT_PAGINATION_CLASS': 'rest_framework.pagination.LimitOffsetPagination', |
187 | 191 | 'PAGE_SIZE': 30, |
188 | 192 | 'TEST_REQUEST_DEFAULT_FORMAT': 'json', |
|
305 | 309 | "DEFAULT_SCOPES": ['openid', ], |
306 | 310 | "DEFAULT_CODE_CHALLENGE_METHOD": 'S256', |
307 | 311 | } |
308 | | -REST_FRAMEWORK['DEFAULT_AUTHENTICATION_CLASSES'] = ( |
309 | | - 'oauth2_provider.contrib.rest_framework.OAuth2Authentication', |
310 | | - 'rest_framework.authentication.SessionAuthentication', |
311 | | - 'rest_framework.authentication.BasicAuthentication', |
312 | | -) |
313 | | - |
314 | 312 | # Redis Configuration |
315 | 313 | DRYCC_REDIS_ADDRS = os.environ.get('DRYCC_REDIS_ADDRS', '127.0.0.1:6379').split(",") |
316 | 314 | DRYCC_REDIS_PASSWORD = os.environ.get('DRYCC_REDIS_PASSWORD', '') |
|
0 commit comments