WebSocketSession#getHandshakeInfo#getPrincipal returns empty Mono even the user has authenticated
See original GitHub issueSummary
I think this should be a regression issue, I found this when I upgraded my Spring Boot from 2.0.5 to 2.0.6.
When I subscribe WebSocketSession#getHandshakeInfo#getPrincipal
,
it always returns an empty Mono
even the request has already authenticated.
Actual Behavior
An empty Mono
is returned.
Expected Behavior
Should return a Mono
that publishes exchange’s principal
(like what we were getting in Spring Boot 2.0.5)
Configuration
Please check the demo project below.
Version
Spring Boot 2.0.6.RELEASE
Sample
I’ve created a demo project for this issue: https://github.com/unlimitedsola/spring-security-regression-issue-empty-principal
I also created a branch named 2.0.5
to prove it did work on Spring Boot 2.0.5.
Issue Analytics
- State:
- Created 5 years ago
- Comments:11 (11 by maintainers)
Top Results From Across the Web
How to perform an action only if the Mono is empty and throw ...
I call a method on the repository layer that will find a user by username and if not found it will return an...
Read more >Build Reactive APIs with Spring WebFlux - Okta Developer
This operation returns a Mono<T> . Both Mono<T> and Flux<T> support chaining processing with the thenMany(Publisher<T>) method.
Read more >Flux.collectList() returns empty list when was called in a chain ...
collectList() is executed, and it turns our chain into a Mono with an empty List inside, but not an empty Mono anymore.
Read more >Web on Reactive Stack - Spring
You can return reactive types (Reactor, RxJava, ... attribute was returned) or an async return value (for example, Mono completed empty).
Read more >Kotlin Mono Examples - YouTube
Get started with reactive programming using Project Reactor in Spring Boot. This video looks at the Mono reactive type with examples in ...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
@unlimitedsola No problem 😄 I’m glad it is now working and thanks for following up so quickly
Thanks for your quick response, after running with
--refresh-dependencies
, the latest snapshot of reactor-netty worked for me. Sorry for disturb 😅