I have an API endpoint for my django application where I am allowing anyone with the JWT access token (valid for 15 mins) to use the API. But it doesn’t work when I do a GET request with the access token. Authentication responds with "Token contained no recognizable user identification"
. Since anyone should be allowed to access the API with the token, I don’t need to check if it’s valid for any particular user.
JWT is a requirement in the project to have stateless user authentication for other APIs.
What is the correct/standard way to avoid this? Do I need a custom class or is there any better method to implement token authentication for APIs?