• Post Reply Bookmark Topic Watch Topic
  • New Topic

Problem with SecurityContextHolder.getContext().getAuthentication()

 
Alejandro Barrero
Ranch Hand
Posts: 361
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I create an aplication STS from "http://websystique.com/springmvc/spring-mvc-4-and-spring-security-4-integration-example/" which acesses the database diectly from Hibernate. The pmo uses:

I was requested to change the application to use Spring Data with JPA in Inlellij Idea using Gradle; the problem I am having is that the controller has among other methods:

The problem is that SecurityContextHolder.getContext().getAuthentication(); is giving me a null value, although it works fine in STS, and I have not been able to determine what is the problem.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!