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
We now provide a reactive variant for auditing with ReactiveAuditingHandler and ReactiveIsNewAwareAuditingHandler.
Extracted common auditing functionality into AuditingHandlerSupport which serves as base class for AuditingHandler and ReactiveAuditingHandler.
Original Pull Request: #458
The implementation accesses the `Authentication` object provided by Spring Security and looks up the custom `UserDetails` instance that you have created in your `UserDetailsService` implementation. We assume here that you are exposing the domain user through the `UserDetails` implementation but that, based on the `Authentication` found, you could also look it up from anywhere.
64
+
65
+
[[auditing.reactive-auditor-aware]]
66
+
=== `ReactiveAuditorAware`
67
+
68
+
When using reactive infrastructure you might want to make use of contextual information to provide `@CreatedBy` or `@LastModifiedBy` information.
69
+
We provide an `ReactiveAuditorAware<T>` SPI interface that you have to implement to tell the infrastructure who the current user or system interacting with the application is. The generic type `T` defines what type the properties annotated with `@CreatedBy` or `@LastModifiedBy` have to be.
70
+
71
+
The following example shows an implementation of the interface that uses reactive Spring Security's `Authentication` object:
72
+
73
+
.Implementation of `ReactiveAuditorAware` based on Spring Security
74
+
====
75
+
[source, java]
76
+
----
77
+
class SpringSecurityAuditorAware implements ReactiveAuditorAware<User> {
0 commit comments