django-rest-framework-jwt Questions

5

Solved

I am managing my User Model (for customers), but i don't know how can i use simple-jwt for my Customer Model with it's custom Login View. models.py from django.db import models class Customer(mode...

4

In Django, superuser can add more user according to their roll. I'm using simple JWT with DRF for authentication. But it is impossible to detect the type of user only by seeing the Access and Refre...
Ulrika asked 26/11, 2018 at 12:6

1

Consider the code below (in urls.py): router = DefaultRouter() router.register('my-endpoint', MyViewSet, basename='mybasename') urlpatterns = [ path('api/v1/', include(router.urls)), path('api/t...
Cohune asked 17/2, 2020 at 14:46

3

Solved

I've been using djangorestframework-simplejwt for a while and now I want to store the JWT in the cookies (instead of localstorage or front-end states) so that every request that the client makes, c...

4

Solved

I want to ask if it's a good idea to logout when I'm using JWT. To log in, I send a post request with username and password to get the desired token (saved into localStorage) which will allow me to...

2

I am using Django Rest Framework and I've included a 3rd party package called REST framework simple JWT Auth which is the new framework referenced, and this one, REST framework JWT Auth, which is t...

4

I am trying to get list of user from API with JWT token so I generated the token and with email and pass and trying to make get request with token but I get this error: File "/home/tboss/Deskt...

2

I am using Django JWT to power up authentication system in my project. Also, I have a middleware, and the problem is that inside it, the user is anonymous for some reason, while in the view I am a...
O asked 11/6, 2018 at 8:18

2

I have a custom user model and have created a custom authentication backend. I am using django rest framework, and django rest framework JWT for token authentication. User model: class User(Abstr...
Millenarian asked 26/5, 2017 at 20:30

1

I want to use the most secure method to store my logged in users session in a cookie. the backend is built on Django & DRF, so I'm choosing between the simplejwt plugin for token auth or django...

2

Solved

I am using django-rest-framework for the REST API. Also, for JSON web token authentication I am using django-rest-framework-jwt. After a successful login, the user is provided with a token. I have ...
Overcome asked 15/9, 2017 at 2:54

1

Solved

I wrote in urls: from rest_framework_simplejwt.views import ( TokenObtainPairView, TokenRefreshView, ) urlpatterns = [ ... path('api/token/', TokenObtainPairView.as_view(), name='token_obtain...
Irruption asked 29/8, 2020 at 15:9

1

Solved

I am building a REST API with Django Rest Framework. I currently have an issue where some of my endpoints return HTTP 401 Unauthorized, whereas the vast majority of my endpoints return correct resp...

1

Solved

from rest_framework_simplejwt.serializers import TokenObtainPairSerializer from rest_framework_simplejwt.views import TokenObtainPairView from rest_framework_simplejwt.utils import datetime_to_ep...

3

Scenario: I want a user to re-login when passing to a security sensible area after N minutes, e.g. when user is about to pay an order, however he logged in 1 hour ago, I would like to be sure it's ...

1

I want to build the SPA application using Django Rest Framework as a back-end. The application will use Token authentication. For maximum security, I want to store the authentication token inside ...

1

Solved

I'm trying to set a Authentication middleware for django channels. I want this middleware to be active only for websocket requests. Seems like that in this case i don't get a full middleware funct...

1

Solved

I am using django rest frameworks JWT library http://getblimp.github.io/django-rest-framework-jwt/ There are two settings on JWT token expiration JWT_EXPIRATION_DELTA which is in seconds The do...

2

Solved

Implemented Django REST and authentication using JWT. For JWT token we have to refresh it before it expire. After expired JWT wont give new token. For my mobile device I need to refresh the toke...
Dingess asked 2/3, 2017 at 5:34

1

Solved

Im trying to create an api using the Django-Rest-Framework (DRF) to CRUD a User. I have managed to create and read a user, but for some reason update will not work. It seems to be that it is trying...

1

Solved

I am trying to use django rest_framework_jwt. I can get it to generate a token but when i try and send it in the header to a protected view i get 'Authentication credentials were not provided.' Th...
1

© 2022 - 2024 — McMap. All rights reserved.