It allows to manage entities, persist them and obtain a robust security with Spring Security and JWT
-
Security
1.1 Secure user authentication using Spring Security.
1.2 Generation and validation of JWT tokens to guarantee authorization.
1.3 Establishment of roles and privileges for users (USER, ADMIN and MANAGER).
1.4 Restriction of access to resources according to the roles and privileges assigned.
1.5 Sending a welcome email to the user upon registration.
- Entities: Users can create and manage three main entities: Character, Movie, and Genre.
- Persistence: Entity data is stored in an SQL database for persistence.
- Relationships: Users have the ability to relate existing or created entities. For example, characters can be linked to movies, and the latter to genres.
- CRUD Operations: The API provides basic create, read, update, and delete (CRUD) operations for parent entities.
- Advanced Filtering: In addition to CRUD operations, the API allows users to filter desired information from the database, providing additional functionality to meet their specific needs.
- Java 17
- Spring Boot 3.0.4
- JSON Web Tokens
- Project Lombok
- MySQL
- SendGrid - Sending Emails
- OpenAPI 2.1 - Document The API
- Postman - Document The API
- Clone this repository :
https://github.com/majuarezmagarinios/moviesCharactersAPI.git
- Create Schema with name "moviescharactersapi"
- Change username and password in application.properties
- When you register or log in correctly you will get a token with which you can access the endpoints according to your role and permissions
- In the src\apiDocumentation folder there is a file that you can export to Postman where you will have all the http methods to test
- You must create the application key of your email provider. For example for Gmail you can follow this link Link.
- In the resources/application.properties file, place the key generated in the previous point after the equals sign, in the property "spring.sendgrid.api-key=" (line 36). Save changes.
- Go to services/SendGrid mail Service and on line 22 replace "[email protected]" with your mail. Save changes.
- You have finished the minimum configuration so that emails are sent to the user when they register.