Skip to content

Commit 3c91071

Browse files
committed
Update reactive auditing documentation considering Authentication can be null.
Closes #3413
1 parent 0a26946 commit 3c91071

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
@@ -109,6 +109,7 @@ class SpringSecurityAuditorAware implements ReactiveAuditorAware<User> {
109109
public Mono<User> getCurrentAuditor() {
110110
111111
return ReactiveSecurityContextHolder.getContext()
112+
.filter(it -> it.getAuthentication() != null)
112113
.map(SecurityContext::getAuthentication)
113114
.filter(Authentication::isAuthenticated)
114115
.map(Authentication::getPrincipal)

0 commit comments

Comments
 (0)