**[Grigory Kislin](https://jira.spring.io/secure/ViewProfile.jspa?name=gkislin)** opened **[DATAREST-1312](https://jira.spring.io/browse/DATAREST-1312?redirect=false)** and commented Test project located at https://github.com/gkislin/spring-data-rest-authentication-principal Check with [admin@javaops.ru|mailto:admin@javaops.ru] / admin: https://github.com/gkislin/spring-data-rest-authentication-principal/blob/master/src/main/java/ru/javaops/bootjava/restaurantvoting/web/VoteController.java#L54 http://localhost:8080/api/votes/current OK, `AuthenticationPrincipalArgumentResolver involved` https://github.com/gkislin/spring-data-rest-authentication-principal/blob/master/src/main/java/ru/javaops/bootjava/restaurantvoting/web/RestaurantController.java#L39 `[http://localhost:8080/api/restaurants/3/vote]` `java.lang.NullPointerException: nulljava.lang.NullPointerException: null at ru.javaops.bootjava.restaurantvoting.AuthUser.<init>` `AuthenticationPrincipalArgumentResolver doesn't involved.` SecurityContextHolder.getContext().getAuthentication() works fine --- **Affects:** 3.1.3 (Lovelace SR3) **Reference URL:** https://github.com/gkislin/spring-data-rest-authentication-principal
Grigory Kislin opened DATAREST-1312 and commented
Test project located at https://github.com/gkislin/spring-data-rest-authentication-principal
Check with [admin@javaops.ru|mailto:admin@javaops.ru] / admin:
https://github.com/gkislin/spring-data-rest-authentication-principal/blob/master/src/main/java/ru/javaops/bootjava/restaurantvoting/web/VoteController.java#L54
http://localhost:8080/api/votes/current
OK,
AuthenticationPrincipalArgumentResolver involvedhttps://github.com/gkislin/spring-data-rest-authentication-principal/blob/master/src/main/java/ru/javaops/bootjava/restaurantvoting/web/RestaurantController.java#L39
[http://localhost:8080/api/restaurants/3/vote]java.lang.NullPointerException: nulljava.lang.NullPointerException: null at ru.javaops.bootjava.restaurantvoting.AuthUser.<init>AuthenticationPrincipalArgumentResolver doesn't involved.SecurityContextHolder.getContext().getAuthentication() works fine
Affects: 3.1.3 (Lovelace SR3)
Reference URL: https://github.com/gkislin/spring-data-rest-authentication-principal