spring-projects / spring-projects/spring-data-rest
In @RepositoryRestController AuthenticationPrincipalArgumentResolver (@AuthenticationPrincipal) not involved [DATAREST-1312]
@odrotbohm is already working on this.
Since Dec 31, 2020.
- Dominant language
- Java
- Stars
- 958
- Forks
- 568
- PR merge metrics
- No merged PRs in 30d
Description
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:
http://localhost:8080/api/votes/current
OK, AuthenticationPrincipalArgumentResolver involved
[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
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Assessment
This issue has not been assessed yet.