Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/django/20.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
jwt django REST中的更改模型_Django_Rest_Authentication_Jwt - Fatal编程技术网

jwt django REST中的更改模型

jwt django REST中的更改模型,django,rest,authentication,jwt,Django,Rest,Authentication,Jwt,我想使用jwt进行身份验证,但我不想使用用户模型。 我怎样才能做到这一点。 我知道,我应该重写JSONWebTokenSerializer并在jwt_payload_处理程序中设置obj,但显示以下错误消息: object has no attribute 'username' 你想用什么来代替用户型号?我的前端是一个设备,我想通过序列号来验证这个设备

我想使用jwt进行身份验证,但我不想使用用户模型。 我怎样才能做到这一点。 我知道,我应该重写JSONWebTokenSerializer并在jwt_payload_处理程序中设置obj,但显示以下错误消息:

object has no attribute 'username'

你想用什么来代替用户型号?我的前端是一个设备,我想通过序列号来验证这个设备