Skip to content

feat: add spring-boot-auth-roles module with custom login and role-based access#2

Open
rohan-gouda27 wants to merge 1 commit into
alexmond:mainfrom
rohan-gouda27:fix/null-check-user
Open

feat: add spring-boot-auth-roles module with custom login and role-based access#2
rohan-gouda27 wants to merge 1 commit into
alexmond:mainfrom
rohan-gouda27:fix/null-check-user

Conversation

@rohan-gouda27

Copy link
Copy Markdown

This PR introduces a new module, spring-boot-auth-roles, under the spring-boot-security-root project. The module demonstrates a simple Spring Boot application with:

  • Custom login page using Thymeleaf
  • Role-based access control with three pages:
    • Index page: Public, accessible by anyone, with login/logout button
    • User page: Accessible by authenticated users with USER or ADMIN role
    • Admin page: Accessible by authenticated users with ADMIN role
  • In-memory user management configured via application.yaml
  • Spring Security configuration using SecurityFilterChain
  • Thymeleaf templates for all pages
  • Example users:
    • user / password (USER role)
    • admin / password (ADMIN, USER roles)

This module is intended as a reference for integrating Spring Security, Thymeleaf, and role-based authentication in a modern Spring Boot application.


Closes: #

alexmond added a commit that referenced this pull request Jun 29, 2026
Component was name: samples / version: 0.0.1 (published nowhere the hub links).
Rename to spring-boot-playground + version: true (matches jsupervisor), add
start_page, so it publishes at /spring-boot-playground/current/ — exactly where
the docs-hub card already points. Surfaced via GA4 (404 was the hub's #2 page).

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01E5Xq9z5h82reuUpH9BqmR3
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant