When creating an API you can manage a “session” with a JWT Json Web Tokens ensuring the user has login previously.
This post explains how JWT is working and how to implement it with SpringBoot using user identity stored in a Database.
This is based on a real implementation and is the sum of lots of search on Internet to make it correctly working.
SpringBoot is a really efficient framework for creating webservices and much more. For this reason I’m using it to design my backend applications.
This framework is also well referenced on Internet and many people are downloading it and using it. All of this sounds really good and you will see you can make a webservice in less than 5 minutes following the many examples existing on Internet. As usually in this kind of technology once you have made the classical HelloWorld and university classical practices you have a lot of difficulties to make your first real program coupling different simple use-cases. So As I spent a couple of hours searching solution on Internet, this post will give you a full example of a project getting data from a MongoDB instance to provide a simple webservice.