django-rest-swagger
django-rest-swagger copied to clipboard
Django JWT authentication does not load all the protected urls
Following is my code in settings.py
SWAGGER_SETTINGS = {
'LOGIN_URL': 'api:login',
'LOGOUT_URL': 'api:logout',
'USE_SESSION_AUTH': False,
'DOC_EXPANSION': 'list',
'APIS_SORTER': 'alpha',
'SECURITY_DEFINITIONS': {
'api_key': {
'type': 'apiKey',
'in': 'header',
'name': 'Authorization',
"description": "JWT authorization"
}
},
}
'DEFAULT_AUTHENTICATION_CLASSES': [
'rest_framework_jwt.authentication.JSONWebTokenAuthentication',
],
# Permission settings
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.IsAuthenticated',
],
When i login using my api in the swagger and fill in the information in the Authorize button pop up, my api list which is protected still does not appear.
I tried adding it as 'Bearer token', but it do not work.
To clarify this issue is in version 2.2.0 and works in swagger 2.1.2
This is a duplicated issue of #759