A multi-service showcase project demonstrating OAuth2/OIDC authentication with Spring Authorization Server, a Spring Boot backend, an Angular frontend, Redis session caching, and oauth2-proxy for centralized authentication.
- auth-server: Spring Authorization Server providing OAuth2/OIDC authentication
- backend: Spring Boot API server (protected by OAuth2)
- frontend: Angular application
- oauth2-proxy: Handles authentication flow and proxies requests to backend and frontend
- redis: Session storage for oauth2-proxy
- Java 21+ (for building the Spring Boot applications)
- Node.js and npm (for frontend development)
- Docker and Docker Compose
The auth-server and backend projects need to be built and packaged as Docker images first.
Build the auth-server image:
cd auth-server
./gradlew bootBuildImageBuild the backend image:
cd backend
./gradlew bootBuildImageOnce the Docker images are built, start all services using Docker Compose:
docker-compose upOr run in detached mode:
docker-compose up -dNavigate to http://localhost:4180 in your browser.
You will be redirected to the login page. Use the following credentials:
- Username:
user - Password:
password
After successful authentication, you will be redirected to the frontend home page.
All traffic goes through oauth2-proxy on port 4180:
/api/*requests are routed to the backend- All other requests are routed to the frontend