@ConnectMapping("setup")
public void setup(@AuthenticationPrincipal Principal principal) {
}
@MessageMapping("hello")
public void hello(@AuthenticationPrincipal Principal principal) {
}
The two mappings are on the server side.
When the RSocket client setup a connection with 'message/x.rsocket.authentication.v0' metadata,
and then send request to hello
mapping.
The first principal is null.
The second principal is the expected authentication data.
How to resolve the principal in @ConnectMapping?