
Day 3 - Added Security, Authentication and Jwt Tokens in REST API Project
I restarted my coding journey with a simple rule: Improve 1% every day. The features I worked on today include: Pagination Request Validation Spring Security JWT Authentication Pagination in the Task API Earlier, my API returned all tasks at once. That works when the data is small, but in real applications the database can contain thousands of records. So I added pagination to the API. Now tasks can be fetched page by page instead of loading everything in one response. This improves performance and makes the API much easier for the frontend to handle. Request Validation I also implemented request validation . Before this, the API would accept requests even if important fields like the title or description were missing. Now the API validates the input and returns an error if required fields are not provided. Spring Security Integration Another major step today was adding Spring Security . This allows the application to protect certain endpoints and control who can access them. Authentic
Continue reading on Dev.to
Opens in a new tab

.png&w=1200&q=75)