Closed
Description
When I upgrade from springboot 3.1.4 to 3.2 @SubscriptionMapping seemed to be missing AuthenticationPrincipal
@SubscriptionMapping
public Flux<Video> recentVideos(@AuthenticationPrincipal Account account) {
return userService.listRecentVideos(account.getId());
}
org.springframework.security.authentication.AuthenticationCredentialsNotFoundException: No Authentication
at org.springframework.graphql.data.method.annotation.support.PrincipalMethodArgumentResolver.resolveAuthentication(PrincipalMethodArgumentResolver.java:68) ~[spring-graphql-1.2.4.jar:1.2.4]
@QueryMapping works fine.
@QueryMapping
public Mono<User> me(@AuthenticationPrincipal Account account) {
return userRepository.findByAccountId(account.getId());
}
but in 3.1.4 it works fine.