Conversation
Relocate default profiles to class `OrganisationProfile` so that they are not affected by refactoring of `Authentication` classes
`ClaimNamesProvider` must be used to ensure claim prefix is applied.
Principal is already represented by Spring's `Authentication` class
Follows Spring model of fine-grained converters with auto-configuration for easy substitution of conversion strategy for specific claims
This replaces `UserInfoExtractor` and `JsonClaimsParser` with an equivalent aligned with Spring's composable converters pattern
- Shorten `Builder` name, avoid redundant name - Capture account - Return default organisation profile when profile not found - Add singular builder methods for authorities, roles and groups
Instead of an abstract class with logic-driven implementations, turn `QuickcaseAuthentication` into a value-based class with final fields set via constructor. The intent is to reduce the differences and unify behaviour as much as possible between user and client-based authentication. At the same time, the structure of the authentication is also reviewed to better align with Spring Security's philosophy where the authentication class is exclusively intended for Spring while the contained `UserDetails` (here `UserInfo`) is intended for the consuming applications. Hence, all user-centric properties are now exclusively captured in `UserInfo` and `QuickcaseAuthentication` extends them with client-centric properties for the purpose of Spring Security.
For auto-configuration to be overridable, all beans should have a condition on target bean missing
Auto-configuration classes contains large number of lines which can't easily be tested and bring coverage down
gbenadikar
approved these changes
Mar 31, 2025
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
UserInfoinstance for client-driven authentication