You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is an example that combines @PreAuthorize and @Async. However, this will not work out of the box since the security check is performed after the background thread has started to execute the job.
You need to use a DelegatingSecurityContextAsyncTaskExecutor for the security check to work. Note that any access denied exceptions are caught by the background thread and not the calling thread.
It may be easier to just use programmatic task execution when also dealing with security.
The text was updated successfully, but these errors were encountered:
Page: https://vaadin.com/docs/latest/building-apps/application-layer/background-jobs/triggers
There is an example that combines
@PreAuthorize
and@Async
. However, this will not work out of the box since the security check is performed after the background thread has started to execute the job.You need to use a
DelegatingSecurityContextAsyncTaskExecutor
for the security check to work. Note that any access denied exceptions are caught by the background thread and not the calling thread.It may be easier to just use programmatic task execution when also dealing with security.
The text was updated successfully, but these errors were encountered: