How to get username from Django Rest Framework JWT token
<p>I am using Django Rest Framework and i've included a 3rd party package called <a href="http://jpadilla.github.io/django-rest-framework-jwt/#usage" rel="noreferrer">REST framework JWT Auth</a>. It returns a token when you send a username/password to a certain route. Then the token is needed for permission to certain routes. However, how do I get the username from the token? I've looked all through the package documentation and went through StackOverflow. It is a JSON Web Token and I am assuming there is a method like <code>username = decode_token(token)</code> but I haven't found such a method. </p>