-
Notifications
You must be signed in to change notification settings - Fork 2.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Improves documentation on SecurityIdentityAugmentor with Hibernate #30283
Conversation
b9879ed
to
053c38b
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vanny96, thanks for the PR, @loicmathieu, can you please review it can work as expected given your earlier case ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I didn't test the changes but as long as the request context is activated using the annotation on a CDI bean method it should work.
3329020
to
c689a50
Compare
@vanny96 Can you please squash the last commit ? Thanks |
🙈 The PR is closed and the preview is expired. |
The example at Security Tips and Tricks for Hibernate doesn't work as it results in a ContextNotActiveException (See issue 12640).
The proper solution to use Hibernate in a SecurityIdentityAugmentor is to create a class which extends Supplier and annotate its
get
method with@ActivateRequestContext
This MR provides this solution as the example to use in the documentation