Skip to content

backend for frontend pattern with oauth2 and spring gateway

Notifications You must be signed in to change notification settings

tejasMadrewar/keycloak-bff-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Todo Gateway (BFF Pattern)

  • This project demonstrates a Backend-for-Frontend (BFF) pattern using Spring Boot 6 + Spring Security 6 + Keycloak + WebFlux Gateway.
  • The Gateway acts as the login entry point, handles security, and proxies requests to the Todo Service.

Features

  • Gateway as Login Point (/oauth2/authorization/keycloak)
  • Session-based token handling
  • Routes requests to Todo Service (/todos/**)
  • Simple HTML UI (index.html) for manual testing

Authentication Flow

  • User clicks Login → redirected to Keycloak login page.
  • After successful login → session created at Gateway.
  • Requests to /todos/** are automatically forwarded with the token.
  • User can Logout at /logout.

HTML Test Page

Features

  • Login / Logout buttons
  • Paginated Todo table (with Edit/Delete actions)
  • Create new todo

Configuration

Update postgres db and oauth2 authorization server information in application.properties files of gateway and todo app.

About

backend for frontend pattern with oauth2 and spring gateway

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published