Search in sources :

Example 1 with CurrentSecurityContextArgumentResolver

use of org.springframework.security.web.method.annotation.CurrentSecurityContextArgumentResolver in project spring-security by spring-projects.

the class WebMvcSecurityConfiguration method addArgumentResolvers.

@Override
@SuppressWarnings("deprecation")
public void addArgumentResolvers(List<HandlerMethodArgumentResolver> argumentResolvers) {
    AuthenticationPrincipalArgumentResolver authenticationPrincipalResolver = new AuthenticationPrincipalArgumentResolver();
    authenticationPrincipalResolver.setBeanResolver(this.beanResolver);
    argumentResolvers.add(authenticationPrincipalResolver);
    argumentResolvers.add(new org.springframework.security.web.bind.support.AuthenticationPrincipalArgumentResolver());
    CurrentSecurityContextArgumentResolver currentSecurityContextArgumentResolver = new CurrentSecurityContextArgumentResolver();
    currentSecurityContextArgumentResolver.setBeanResolver(this.beanResolver);
    argumentResolvers.add(currentSecurityContextArgumentResolver);
    argumentResolvers.add(new CsrfTokenArgumentResolver());
}
Also used : CurrentSecurityContextArgumentResolver(org.springframework.security.web.method.annotation.CurrentSecurityContextArgumentResolver) CsrfTokenArgumentResolver(org.springframework.security.web.method.annotation.CsrfTokenArgumentResolver) AuthenticationPrincipalArgumentResolver(org.springframework.security.web.method.annotation.AuthenticationPrincipalArgumentResolver)

Aggregations

AuthenticationPrincipalArgumentResolver (org.springframework.security.web.method.annotation.AuthenticationPrincipalArgumentResolver)1 CsrfTokenArgumentResolver (org.springframework.security.web.method.annotation.CsrfTokenArgumentResolver)1 CurrentSecurityContextArgumentResolver (org.springframework.security.web.method.annotation.CurrentSecurityContextArgumentResolver)1