val messageByUsername: Mono
always returns null, even when authentication has been done.
Code for authentication : return webFilterChain.filter(serverWebExchange).contextWrite { var cont = ReactiveSecurityContextHolder.withSecurityContext( Mono.just( SecurityContextImpl( injectSecurityPrincipal(reqHeaders[USER_ID_ATTRIBUTE]!!.first(), scopes) ) ) )
Comment From: sjohnr
Duplicate of gh-11721.