Skip to content

Commit 5a40833

Browse files
committed
Update reactive auditing documentation considering Authentication can be null.
Closes #3413
1 parent 21809f7 commit 5a40833

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/main/antora/modules/ROOT/pages/auditing.adoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ class SpringSecurityAuditorAware implements ReactiveAuditorAware<User> {
104104
public Mono<User> getCurrentAuditor() {
105105
106106
return ReactiveSecurityContextHolder.getContext()
107+
.filter(it -> it.getAuthentication() != null)
107108
.map(SecurityContext::getAuthentication)
108109
.filter(Authentication::isAuthenticated)
109110
.map(Authentication::getPrincipal)

0 commit comments

Comments
 (0)