Ver código fonte

add jwt urls

pull/342/head
Guillaume Vincent 8 anos atrás
pai
commit
b27b3295c3
2 arquivos alterados com 7 adições e 1 exclusões
  1. +3
    -1
      api/urls.py
  2. +4
    -0
      lesspass/settings.py

+ 3
- 1
api/urls.py Ver arquivo

@@ -9,5 +9,7 @@ router.register(r'entries', views.EntryViewSet, base_name='entries')

urlpatterns = [
url(r'^', include(router.urls)),
url(r'^sessions/', rest_framework_jwt.views.obtain_jwt_token),
url(r'^token-auth/', rest_framework_jwt.views.obtain_jwt_token),
url(r'^token-verify/', rest_framework_jwt.views.verify_jwt_token),
url(r'^token-refresh/', rest_framework_jwt.views.refresh_jwt_token),
]

+ 4
- 0
lesspass/settings.py Ver arquivo

@@ -138,6 +138,10 @@ AUTHENTICATION_BACKENDS = (
'django.contrib.auth.backends.ModelBackend',
)

JWT_AUTH = {
'JWT_ALLOW_REFRESH': True,
}

EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend'

STATIC_ROOT = os.path.join(BASE_DIR, 'www', 'static')


Carregando…
Cancelar
Salvar