In order to handle JWT-based token authentication, we need to implement the required middleware for doing these tasks:
POSTrequests coming from our client.
Although ASP.NET Core natively supports JWT tokens, the only available middleware is the one validating the request
JwtBearerMiddleware). This leaves us with two choices: manually implement what's missing or rely on a third-party library that does just that. We'll try the hand-made route throughout the rest of this chapter, leaving the other alternative to the following chapter.
The first thing to do is define ...