Class AuthenticationPrincipalArgumentResolver

java.lang.Object
org.springframework.graphql.data.method.annotation.support.AuthenticationPrincipalArgumentResolver
All Implemented Interfaces:
HandlerMethodArgumentResolver

public class AuthenticationPrincipalArgumentResolver extends Object implements HandlerMethodArgumentResolver
Resolver to obtain Authentication.getPrincipal() from Spring Security context via SecurityContext.getAuthentication() for parameters annotated with AuthenticationPrincipal.

The resolver checks both ThreadLocal context via SecurityContextHolder for Spring MVC applications, and ReactiveSecurityContextHolder for Spring WebFlux applications.

Since:
1.0.0
Author:
Rob Winch