class VerifyTokenView(TokenVerifyView): # renderer_classes = (CustomJSONRenderer,) token_verify = TokenVerifyView.as_view()
from . import views router = DefaultRouter() router.register(r'rooms', views.RoomViewSet) router.register(r'reviews', views.ReviewViewSet) router.register(r'photos', views.PhotoViewSet) router.register(r'comments', views.CommentViewSet) router.register(r'users', views.UserViewSet) router.register(r'mentors', views.MentorViewSet) urlpatterns = [ path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), # email, password path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), # refresh: refresh token path('token/verify/', TokenVerifyView.as_view(), name='token_verify'), # token: token path('login/', views.login, name='login'), # path('logout/', views.logout, name='logout'), path('kakao-login/', views.kakao_login, name='kakao_login'), path('kakao-login/token/', views.get_kakao_token, name='kakao_token'), path('interest-rooms/<int:room_id>/', views.interest_room, name='interest_room'), path('users/auth/', views.SMSAuthView.as_view(), name='user_auth'), path('password-reset/', views.UserPasswordResetView.as_view(), name='password_reset'), path('password-reset-done/', auth_views.PasswordResetDoneView.as_view(), name='password_reset_done'),
# Create a router and register our viewsets with it. # router = DefaultRouter() # router.register(r'users', views.UserViewSet) # router.register(r'profiles', views.ProfileViewSet) urlpatterns = [ # path('', include(router.urls)), # path('favicon.ico', serve, {'path': 'image/favicon.ico'}), path('admin/', admin.site.urls), path('api/auth/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('api/auth/refresh/', TokenRefreshView.as_view(), name='token_refresh'), path('api/auth/token/verify/', TokenVerifyView.as_view(), name='token_verify'), path('api/auth/', include('rest_framework.urls', namespace='rest_framework')), path('account/', include(('account.urls', 'account'), namespace='account')), path('content/', include(('content.urls', 'content'), namespace='content')), path('ad/', include(('ad.urls', 'ad'), namespace='ad')), path('interaction/', include(('interaction.urls', 'interaction'), namespace='interaction')), path('chat/', include(('chat.urls', 'chat'), namespace='chat')), # re_path(r'^api/auth/$', include('rest_framework.urls', namespace='rest_framework')), ]
from django.urls import re_path from rest_framework_simplejwt.views import TokenRefreshView, TokenVerifyView from .views import CustomTokenObtainView from .views import ProfileViewSet from .views import RegistrationView urlpatterns = [ re_path(r'^registration/$', RegistrationView.as_view(), name='registration'), re_path(r'^token/$', CustomTokenObtainView.as_view(), name='token_obtain_pair'), re_path(r'^token/refresh/$', TokenRefreshView.as_view(), name='token_refresh'), re_path(r'^token/verify/$', TokenVerifyView.as_view(), name='token_verify'), re_path(r'^profile/$', ProfileViewSet.as_view(), name='profile'), ]
from django.conf.urls import url from rest_framework_simplejwt.views import (TokenObtainPairView, TokenRefreshView, TokenVerifyView) from .views import Register, HelloWorld urlpatterns = [ url(r'^api/token$', TokenObtainPairView.as_view()), url(r'^api/verify$', TokenVerifyView.as_view()), url(r'^register$', Register.as_view()), url(r'^hello$', HelloWorld.as_view()) ]
from django.urls import path from rest_framework_simplejwt.views import (TokenRefreshView, TokenVerifyView) from . import views app_name = "auth" urlpatterns = [ path('login', views.AuthLogin.as_view(), name="login"), path('token-refresh', TokenRefreshView.as_view(), name="token_refresh"), path('token-verify', TokenVerifyView.as_view(), name="token_verify"), path('register', views.RegisterView.as_view(), name="register"), ]
from django.contrib import admin from django.urls import include, path from django.conf.urls import url from rest_framework_swagger.views import get_swagger_view from rest_framework import routers from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, TokenVerifyView, ) # from django_mysite.apps.rest import views router = routers.DefaultRouter() # router.register(r'users', views.UserViewSet) # router.register(r'groups', views.GroupViewSet) schema_view = get_swagger_view(title='Cross tournaments API') urlpatterns = [ url(r'^api_doc/$', schema_view), path('', include(router.urls)), url(r'^tournaments/', include('tournaments.urls')), path('admin/', admin.site.urls), url(r'^api/token/$', TokenObtainPairView.as_view(), name='token_obtain_pair'), url(r'^api/token/refresh/$', TokenRefreshView.as_view(), name='token_refresh'), url(r'^api/token/verify/$', TokenVerifyView.as_view(), name='token_verify'), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), ]
from django.urls import path from .views import UserListView, UserCreateView, UserDetailView, UserFavoriteView, UserFavoriteCreateView, UserFavoriteRemoveView from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, TokenVerifyView, ) urlpatterns = [ path('', UserListView.as_view()), path('register/', UserCreateView.as_view(), name='register'), path('token/', TokenObtainPairView.as_view()), path('token/refresh/', TokenRefreshView.as_view()), path('token/token-verify/', TokenVerifyView.as_view()), path('favorites/', UserFavoriteView.as_view()), path('favorites/add/', UserFavoriteCreateView.as_view()), path('favorites/remove/', UserFavoriteRemoveView.as_view()), ]
from django.urls import path from rest_framework_simplejwt.views import TokenRefreshView, TokenVerifyView from deep_trust_app.registration.views import RegistrationView, RegistrationValidationView, TokenUserObtainView, \ PasswordResetView, \ PasswordResetValidationView, PsychologistRegistrationView app_name = 'registration' urlpatterns = [ path('token/', TokenUserObtainView.as_view(), name='retrieve-token-and-user'), path('token/refresh/', TokenRefreshView.as_view(), name='retrieve-refreshed-token'), path('token/verify/', TokenVerifyView.as_view(), name='verify-token'), path('registration/', RegistrationView.as_view(), name='registration'), path('registration/psychologist/', PsychologistRegistrationView.as_view(), name='registration'), path('registration/validation/', RegistrationValidationView.as_view(), name='registration-validation'), path('password-reset/', PasswordResetView.as_view(), name='password-reset'), path('password-reset/validation/', PasswordResetValidationView.as_view(), name='password-reset-validation'), ]
from django.contrib import admin from django.urls import path, include from django.conf.urls.static import static from django.conf import settings from rest_framework_simplejwt.views import ( TokenRefreshView, TokenVerifyView, ) urlpatterns = [ path("api/v1/token/refresh/", TokenRefreshView.as_view()), path("api/v1/token/verify/", TokenVerifyView.as_view()), path("api/v1/user/", include("user.urls")), path("api/v1/article/", include("mlarticles.urls")), path("ckeditor/", include("ckeditor_uploader.urls")), path("admin/", admin.site.urls), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.urls import url from django.urls import path, include from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, TokenVerifyView ) from .views import create_user_view, SignupMailSentView, SignupDomainError, create_org_addition_request, RequestOrgAdditionSuccess, \ activate_user, RequestOrgAdditionAPIView, OrgMailSentView, activate_org, RegisterAnonymousContributor urlpatterns = [ path('', include('django.contrib.auth.urls')), url(r'^signup$', create_user_view, name='signup'), url(r'^api/signup/anon$', RegisterAnonymousContributor.as_view(), name='api-signup-anon'), path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), path('api/token/verify/', TokenVerifyView.as_view(), name='token_verify'), # TODO remove url(r'^regmailsent$', SignupMailSentView.as_view(), name='regmailsent'), url(r'^orgregmailsent$', OrgMailSentView.as_view(), name='org-reg-mail-sent'), url(r'^request_org_addition$', create_org_addition_request, name='req-org-addition'), url(r'^request_org_addition/create$', RequestOrgAdditionAPIView.as_view(), name='api-req-org-addition-create'), url(r'^request_org_addition/success$', RequestOrgAdditionSuccess.as_view(), name='req-org-addition-success'), url(r'^error/domainmismatch/(?P<pk>[0-9]+)$', SignupDomainError.as_view(), name='signup-domain-error'), url(r'^activate_user/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]*-[0-9A-Za-z]*)/$', activate_user, name='activate_user'), url(r'^activate_org/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]*-[0-9A-Za-z]*)/$', activate_org, name='activate_org'), ]
Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path, include from django.conf.urls import url from django.views.generic.base import TemplateView from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, TokenVerifyView, ) from rest_auth.registration.views import RegisterView from shout_app.authentication.views import EmailConfirmAPIView urlpatterns = [ path('', TemplateView.as_view(template_name='home.html'), name='home'), # path('admin/', admin.site.urls), path('', include('shout_app.authentication.urls')), path('', include('shout_app.profile.urls')), path('', include('shout_app.shouts.urls')), path('api/request-auth-token', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('api/request-auth-token/refresh', TokenRefreshView.as_view(), name='token_refresh'), path('api/request-auth-token/verify', TokenVerifyView.as_view(), name='token_verify'), path('api/signup/', RegisterView.as_view(), name='account_signup'), url('confirm_email/(?P<key>[-:\w]+)/$', EmailConfirmAPIView.as_view(), name='account_confirm_email') ]
Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path from django.conf.urls import url, include from rest_framework_simplejwt.views import TokenRefreshView, TokenVerifyView from auth.for_jwt import UserTokenObtainPairView from apps_app.views import GetTokenPairForApp, VerifyTokenForApp, RefreshTokenForApp urlpatterns = [ path('admin/', admin.site.urls), url(r'^api/api-token-auth/', UserTokenObtainPairView.as_view()), url(r'^api/api-token-refresh/', TokenRefreshView.as_view()), url(r'^api/api-token-verify/', TokenVerifyView.as_view()), url(r'^api/app-token-auth/', GetTokenPairForApp.as_view()), url(r'^api/app-token-verify/', VerifyTokenForApp.as_view()), url(r'^api/app-token-refresh/', RefreshTokenForApp.as_view()), url(r'', include('auth_app.urls')), url(r'', include('apps_app.urls')), url(r'', include('users_app.urls')), ]
from rest_framework_simplejwt.views import TokenObtainPairView, TokenRefreshView, TokenVerifyView from django.conf.urls import url, include from django.contrib.auth.models import User from rest_framework import routers from aims.serializers import UserSerializer from aims.viewsets import UserViewSet # Routers provide an easy way of automatically determining the URL conf. router = routers.DefaultRouter() router.register(r'users', UserViewSet) # Wire up our API using automatic URL routing. # Additionally, we include login URLs for the browsable API. urlpatterns = [ url(r'^', include(router.urls)), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^api/token/$', TokenObtainPairView.as_view(), name='token_obtain_pair'), #issue token route url(r'^api/token/refresh/$', TokenRefreshView.as_view(), name='token_refresh'), #refresh token route url(r'^api/token/verify/$', TokenVerifyView.as_view(), name='token_verify'), #token evrification for users route ]
"""learn URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path,include from api.auth import CustomAuthToken from rest_framework_simplejwt.views import TokenObtainPairView,TokenRefreshView,TokenVerifyView from django.views.decorators.csrf import csrf_exempt urlpatterns = [ path('admin/', admin.site.urls), path('',include('api.urls')), #path('gettoken/',CustomAuthToken.as_view()), path('gettoken/',TokenObtainPairView.as_view(),name='token_obtain_pair'), path('refreshtoken/',TokenRefreshView.as_view(),name='token_refresh'), path('verifytoken/',TokenVerifyView.as_view(),name='verify_token'), ]
router = DefaultRouter() router.register(r'users', UserViewSet) core_api_patterns = router.urls #Define schema for the api documentation schema_view = get_schema_view( openapi.Info( title="e-learning API", default_version='v1', description="This is the api documentation for a test api", contact=openapi.Contact(email="*****@*****.**"), license=openapi.License(name="BSD License"), ), public=True, permission_classes=(permissions.AllowAny, ), ) #Create an array with the urls api_patterns = [ #Core views url(r'^', include(core_api_patterns)), #Token url(r'^token-auth/', TokenObtainPairView.as_view()), url(r'^token-refresh/', TokenRefreshView.as_view()), url(r'^token-verify/', TokenVerifyView.as_view()), #docs url(r'^swagger/$', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), ]
"""main_project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.0/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path, include from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, TokenVerifyView ) urlpatterns = [ path('admin/', admin.site.urls), path('api/v1/api-auth', include('rest_framework.urls')), path('api/v1/token', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('api/v1/token/refresh', TokenRefreshView.as_view(), name='token_refresh'), path('api/v1/token/verify', TokenVerifyView.as_view(), name='token_verify'), path('api/v1/', include('api.urls')), ]
urlpatterns = [ path('admin/', admin.site.urls), path('', include('users.urls'), name='users'), path('', include('books.urls'), name='books'), path('docs/', schema_view), ## Authentication Paths ## ## Session path('api-auth/', include('rest_framework.urls')), ## Token path('api/token/custom', CustomAuthToken.as_view(), name=CustomAuthToken.name), ## OAuth path('o/', include('rest_framework_social_oauth2.urls')), path('social/<backend>/', exchange_token), ## JWT path('api/token/jwt/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('api/token/jwt/refresh/', TokenRefreshView.as_view(), name='token_refresh'), path('api/token/jwt/verify/', TokenVerifyView.as_view(), name='token_verify'), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# Wire up our API using automatic URL routing. # Additionally, we include login URLs for the browsable API. urlpatterns = [ # Root API path("api/", APIRoot.as_view()), path("api/api-saml/", include('django_saml2_pro_auth.urls')), #Authentication and Admin path('api/api-auth/', include('rest_framework.urls', namespace='rest_framework')), path('api/api-auth/logout/', samlLogout.as_view(), name='user-logout'), re_path(r'^api/token/$', MyTokenObtainPairView.as_view(), name='token_obtain_pair'), re_path(r'^api/token/refresh/$', TokenRefreshView.as_view(), name='token_refresh'), re_path(r'^api/token/verify/$', TokenVerifyView.as_view(), name='token_verify'), path('api/admin/', admin.site.urls), # Cybercommons Django Apps path('api/queue/', include('cybercom_queue.urls')), path('api/data_store/', include('data_store.urls')), path('api/catalog/', include('catalog.urls')), path('api/user/', UserProfile.as_view(), name='user-list'), path('api/counter/', include('counter.urls'), name='counter-list'), path('api/s3/', include('s3.urls'), name='s3-list'), path('api/room-booking/', include('room_booking.urls'), name='room-booking-list'), path('api/s3-logging/', include('s3-logging.urls'), name='s3-logging-list'), path('ark:/', include('ark-server.urls'), name='ark-server'), re_path(r'^api/upload/', fileDataUploadView.as_view(), name='upload'), ]
from rest_framework import routers from django.urls import include, path from . import views from .views import MangaViewSet, ChapterViewSet, PageViewSet, TagViewSet, CreateUserAPIView, ReportViewSet, ShowUserViewSet from rest_framework_simplejwt.views import (TokenObtainPairView, TokenRefreshView, TokenVerifyView) router = routers.DefaultRouter() router.register(r'manga', MangaViewSet, basename='manga') router.register(r'chapter', ChapterViewSet) router.register(r'page', PageViewSet) router.register(r'tag', TagViewSet) router.register(r'news', ReportViewSet) router.register(r'show_users', ShowUserViewSet) #router.register(r'manga/(?P<library_id>[0-9]+)', MangaViewSet, basename='manga') #router.register(r'manga/<name>', MangaUrlNameViewSet, basename='manga') #router.register(r'books/(?P<library_id>[0-9]+)', MangaUrlNameViewSet, base_name='books') urlpatterns = [ #$path('manga/url_name', views.MangaUrlNameViewSet.as_view(), name=mangaFiltered), path('userinfo/', views.GetUserInfo.as_view(), name='userinfo'), path('token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), path('token/check', TokenVerifyView.as_view(), name='token_checker'), path('create/', CreateUserAPIView.as_view()) ] urlpatterns += router.urls
from django.contrib import admin from django.urls import path, include from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, TokenVerifyView, ) urlpatterns = [ path('admin/', admin.site.urls), path('', include('mainApi.urls')), path('api/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('api/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), path('api/token/verify/', TokenVerifyView.as_view(), name='token_verify'), #For future use to verify if an access token is valid or not ]
The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path, include from rest_framework_simplejwt.views import (TokenObtainPairView, TokenRefreshView, TokenVerifyView) from MVP.routers import ROUTER from auth.viewsets import RegisterView urlpatterns = [ path('admin/', admin.site.urls), path("api-register/", RegisterView.as_view()), path("api-token-auth/", TokenObtainPairView.as_view()), path("api-token-verify/", TokenVerifyView.as_view()), path("api-token-refresh/", TokenRefreshView.as_view()), path("api/v1/", include((ROUTER.urls, "api"), namespace="v1")), ]
'refund-dropdowns', RefundDropdownViewSet ) # Users app from users.views import ( CustomUserViewSet ) users_router = router.register( 'users', CustomUserViewSet ) urlpatterns = [ # These are the SAML2 related URLs. You can change "^saml2_auth/" regex to # any path you want, like "^sso_auth/", "^sso_login/", etc. (required) # url(r'^saml2_auth/', include('django_saml2_auth.urls')), # url(r'^accounts/login/$', django_saml2_auth.views.signin), # url(r'^admin/login/$', django_saml2_auth.views.signin), url(r'^SSOLogin/$', index, name='index'), url(r'^SSOLogin/attrs/$', attrs, name='attrs'), url(r'^SSOLogin/metadata/$', metadata, name='metadata'), url(r'v1/', include(router.urls)), url(r'auth/', include('rest_auth.urls')), url(r'auth/registration/', include('rest_auth.registration.urls')), # url(r'sso/sso_auth/', include('django_saml2_auth.urls')), url('auth/obtain/', MyTokenObtainPairView.as_view(), name='token_obtain_pair'), url('auth/refresh/', TokenRefreshView.as_view(), name='token_refresh'), url('auth/verify/', TokenVerifyView.as_view(), name='token_verify') ]
"""django_project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path, include from rest_framework_simplejwt.views import TokenVerifyView, TokenObtainPairView, TokenRefreshView urlpatterns = [ path('admin/', admin.site.urls), path('', include('django_app.urls')), path('auth/', include('rest_framework.urls')), path('login/', TokenObtainPairView.as_view()), path('refresh/', TokenRefreshView.as_view()), path('profile/', TokenVerifyView.as_view()) ]
from . import views from django.urls import path from rest_framework_simplejwt.views import (TokenObtainPairView, TokenRefreshView, TokenVerifyView) urlpatterns = [ path('apiv1/token/', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('apiv1/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), path('apiv1/token/verify/', TokenVerifyView.as_view(), name='token_verify'), path('apiv1/user/', views.UserHandler.as_view()), path('apiv1/verification/<str:token>/', views.validation), path('apiv1/edit/', views.Edit.as_view()), path('apiv1/suggestion/', views.SuggestionHandler.as_view()), path('apiv1/notif/', views.NotificationHandler.as_view()), path('apiv1/history/', views.HistoryHnadler.as_view()), ]
The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.2/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from django.contrib import admin from django.urls import path, include from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, TokenVerifyView, ) urlpatterns = [ path("admin/", admin.site.urls), path("users/", include("users.urls")), path("posts/", include("posts.urls")), path("api-auth/", include("rest_framework.urls")), path("api/token/", TokenObtainPairView.as_view(), name="token_obtain_pair"), path("api/refresh/", TokenRefreshView.as_view(), name="token_refresh"), path("api/token/verify/", TokenVerifyView.as_view(), name="token_verify"), ]
from django.urls import path, include from rest_framework_simplejwt.views import TokenObtainPairView, TokenVerifyView, TokenRefreshView patterns = ([ path('', TokenObtainPairView.as_view(), name='token_obtain_pair'), path('refresh/', TokenRefreshView.as_view(), name='token_refresh'), path('verify/', TokenVerifyView.as_view(), name='token_verify'), ], 'token') urlpatterns = [ path('token/', include(patterns)), ]
name='account_confirm_email', ), url(r'^social-login/facebook/$', FacebookLogin.as_view(), name='fb_login'), url(r'^social-login/twitter/$', TwitterLogin.as_view(), name='tw_login'), url(r'^social-login/twitter-no-view/$', twitter_login_view, name='tw_login_no_view'), url(r'^social-login/twitter-no-adapter/$', TwitterLoginNoAdapter.as_view(), name='tw_login_no_adapter'), url(r'^social-login/facebook/connect/$', FacebookConnect.as_view(), name='fb_connect'), url(r'^social-login/twitter/connect/$', TwitterConnect.as_view(), name='tw_connect'), url(r'^socialaccounts/$', SocialAccountListView.as_view(), name='social_account_list'), url(r'^protected-view/$', ExampleProtectedView.as_view()), url( r'^socialaccounts/(?P<pk>\d+)/disconnect/$', SocialAccountDisconnectView.as_view(), name='social_account_disconnect', ), url(r'^accounts/', include('allauth.socialaccount.urls')), url(r'^getcsrf/', get_csrf_cookie, name='getcsrf'), url('^token/verify/', TokenVerifyView.as_view(), name='token_verify'), url('^token/refresh/', get_refresh_view().as_view(), name='token_refresh'), ]
from api.viewsets import ( CreateAccountViewset, VerifyViewset, ForgotViewset, EditProfileViewset, CustomTokenObtainPairView, InstagramConnectViewset, FacebookSocialConnectViewset, InstagramFacebookMapViewset, ProfileMetricsViewset, ClickMetricsViewset, AudienceMetricsViewset ) from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, TokenVerifyView ) router = DefaultRouter() router.register('signup', CreateAccountViewset, basename='auth_signup') router.register('account/verify', VerifyViewset, basename='auth_verify') router.register('account/forgot', ForgotViewset, basename='auth_forgot') router.register('editprofile', EditProfileViewset, basename='auth_editprofile') router.register('instagram-verify', InstagramConnectViewset, basename='auth_instagram') router.register('facebook-verify', FacebookSocialConnectViewset, basename='auth_facebook') router.register('instagram-facebook-map', InstagramFacebookMapViewset, basename='map_insta_fb') router.register('metrics/profile', ProfileMetricsViewset, basename='metrics_profile') router.register('metrics/clicks', ClickMetricsViewset, basename='metrics_clicks') router.register('metrics/audience', AudienceMetricsViewset, basename='metrics_clicks') urlpatterns = [ path('', include(router.urls)), path('account/token/get/', CustomTokenObtainPairView.as_view(), name='token_obtain_pair'), path('account/token/verify/', TokenVerifyView.as_view(), name='token_verify'), path('account/token/refresh/', TokenRefreshView.as_view(), name='token_refresh'), ]
from drf_yasg.views import get_schema_view from drf_yasg import openapi schema_view = get_schema_view( openapi.Info( title="Napoleão", default_version='v1', description="cashback calculator", terms_of_service="https://policies.google.com/terms", contact=openapi.Contact(email="rbraga@local"), license=openapi.License(name="BSD License"), ), public=True, permission_classes=[permissions.AllowAny], ) urlpatterns = [ path('admin/', admin.site.urls), path("auth/token/", obtain.as_view(), name="token_obtain_pair"), path("auth/token/refresh/", refresh.as_view(), name="token_refresh"), path("auth/token/verify/", verify.as_view(), name="token_verify"), path("users/", include("users.urls", namespace="users")), path("sales/", include("sales.urls", namespace="sales")), re_path(r'swagger(?P<format>\.json|\.yaml)', schema_view.without_ui(cache_timeout=0), name='schema-json'), path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), ]