Loading repository data…
Loading repository data…
TalhaRizwan093 / repository
Spring-Security Microservices Starter Project with spring-boot best practices. This project serves a template to your new enterprise level application. Spring boot professional and best practices are used in this project. Username Password authentication, Google Auth, Jwt is implemented and fully functional.
In this section we will dive deep into the springboot security in Microservices and go through the detailed lifecycle of a request and response for.
1 Authentication and Authorization Flow
Before building and running the backend we have to ensure that the application properties files has setup correctly and accordingly.
Following are the must have properties.
spring.application.name=OAuthSecurity
spring.security.oauth2.client.registration.google.client-id = {your_google_client_id}
spring.security.oauth2.client.registration.google.client-secret = {your_google_client_secret}
spring.security.oauth2.client.registration.github.client-id = {your_github_client_id}
spring.security.oauth2.client.registration.github.client-secret = {your_github_client_secret}
security.jwt.token.secret-key: {your-jwt-token-secret}
security.jwt.token.expire-length: {you-token-expiry-in-milliseconds}
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver
spring.datasource.url = jdbc:mysql://localhost:3306/{your-desired-db}
spring.datasource.username = {your-mysql-username}
spring.datasource.password = {your-mysql-password}
spring.jpa.hibernate.ddl-auto = update
spring.jpa.hibernate.naming.physical-strategy=org.hibernate.boot.model.naming.PhysicalNamingStrategyStandardImpl
Please add these app properties in your application and donot forget to replace the configurations {your-configs}.
After adding the application properties. Use the following commands to spin up the spring security project.
cd {all microservices}
mvn spring-boot:run
Access the frontend to start using the proejct
For support, email talharizwan.me@gmail.com If you like and using this project please donot Forget to Star it as it means alot to me. Thanks.