from rest_framework_jwt.utils import jwt_decode_handler jwt_decode_handler(token) 这样就能得到用户名了 转自: https://segmentfault.com/q/1010000010762645