re: Developing token authentication using ASP.NET Core VIEW POST

FULL DISCUSSION
 

Thank you for the article, it helped me a lot understanding Token generation/validation as I am new to all this asp.net/asp.net core universe.
I have a question though related with the middleware necessity. As you provided a route for the token generation (/api/token), I ask myself if another approach wouldn't be the implementation of the TokenProviderOption class as a Configuration/Option object as explained in this Microsoft doc (docs.microsoft.com/en-us/aspnet/co...) letting the TokenController manage token generation instead of creating a Middleware, apparently, just to hold the customized options for the token generation process.
I would be grateful for any insights on this matter!

code of conduct - report abuse