Skip to content

Issue 134 add session profile scaffolding for consuming applications#159

Merged
devondragon merged 9 commits intomainfrom
issue-134-Add-SessionProfile-scaffolding-for-consuming-applications
Feb 24, 2025
Merged

Issue 134 add session profile scaffolding for consuming applications#159
devondragon merged 9 commits intomainfrom
issue-134-Add-SessionProfile-scaffolding-for-consuming-applications

Conversation

@devondragon
Copy link
Copy Markdown
Owner

Here's a detailed pull request description for this diff:

Pull Request: User Profile Extension Framework and Spring Integration Improvements

Overview

This PR introduces a comprehensive User Profile Extension Framework, enhancing the Spring User Framework to support rich, application-specific user profiles. It also improves Spring Boot integration and OAuth2 authorization handling, bringing the framework to version 3.1.0.

Major Features

User Profile Extension Framework

The most significant addition is a complete user profile extension system that allows applications to:

  • Create custom user profile entities that extend BaseUserProfile
  • Store application-specific user data beyond core authentication details
  • Access profile information throughout the application via session-scoped components
  • Automatically load profiles during authentication

The framework includes:

  • BaseUserProfile: JPA base entity class that links to core User entities
  • UserProfileService: Interface for profile management
  • BaseSessionProfile: Session-scoped container for current user's profile
  • BaseAuthenticationListener: Loads profiles on successful authentication

Full documentation is provided in the new PROFILE.md file with implementation guides and examples.

Spring Boot Integration Improvements

  • Added UserAutoConfigurationRegistrar to dynamically register the library's base package with Spring Boot
  • Improved component scanning and entity detection
  • Simplified integration with consuming applications by removing manual package configuration
  • Updated path handling for Python interpreter in VS Code settings

Security and Authentication Enhancements

  • Fixed several gaps with Role and Authority handling for OAuth2-based authentication
  • Added AuthorityService to centralize authority management
  • Refactored LoginHelperService to improve code organization and reuse
  • Enhanced email case handling for more reliable user lookups

Documentation Updates

  • Added extensive documentation in PROFILE.md (399 lines)
  • Updated README with new features, examples, and better organization
  • Added information about custom user profiles and extensibility
  • Updated installation instructions for version 3.1.0

Technical Changes

  • Migrated from direct repository access to service-based approach for authorities
  • Improved session management for profiles
  • Added proper transaction management
  • Enhanced logging and removed debug print statements

Version

Updated to version 3.1.0-SNAPSHOT for this release.

Breaking Changes

None. This update is backward compatible with existing implementations.

How to Test

  1. Integrate with a Spring Boot application
  2. Create a custom profile class extending BaseUserProfile
  3. Implement the necessary services and session profile
  4. Verify profile loading during authentication
  5. Test access to profile data in controllers and views

See the demo application repository for complete working examples.

Refreshing issue-134 branch with latest from main
- Updated Python interpreter path in VSCode settings to version 3.13.2.
- Added method security configuration to UserConfiguration class.
- Expanded PUBLISH.md with instructions for creating a new release and publishing to Maven Central.
… Users.

Add LoginHelperService and AuthorityService for user authentication and authority management
@devondragon devondragon merged commit 58ecf92 into main Feb 24, 2025
@devondragon devondragon deleted the issue-134-Add-SessionProfile-scaffolding-for-consuming-applications branch February 24, 2025 21:52
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