Skip to content

Commit

Permalink
#43 Add tokens lib
Browse files Browse the repository at this point in the history
Co-authored-by: Leonardo da Silva Gomes <leonardodasigomes@gmail.com>
  • Loading branch information
KiSobral and LeoSilvaGomes committed Oct 1, 2019
1 parent 84147f8 commit c2e71a5
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/users/urls.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,19 @@
from django.urls import path
# Django
from django.urls import path, include

# Viewsets
from .viewsets import UserRegistrationAPIView

from rest_framework.authtoken.views import obtain_auth_token
# Simple JWT
from rest_framework_simplejwt.views import (
TokenObtainPairView,
TokenRefreshView,
)

app_name = 'users'

urlpatterns = [
path('signup/', UserRegistrationAPIView.as_view(), name='signup'),
path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'),
path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'),
]

0 comments on commit c2e71a5

Please sign in to comment.