app/resources. We just need to create a simple resource class which inherits from
1. Keep in mind as well that these methods are resolved via the container so we can use dependency injection:
password. We can choose to remove these with the
http://localhost:8000/api/user. we will see:
http://localhost:8000/tokenwith your username and password which will give us back a JWT token.
scopesattribute as well as inheriting another class.
serializemethod on them. The
serializemethod takes a single parameter which is the response returned from one of the create, index, show, update, delete methods.
JSONResponseMiddlewarewill pick that dictionary up and return a JSON response.
/endpoint?token=123..) or inside a header (the
HTTP_AUTHORIZATIONheader). We can get the token regardless of where it is with the