• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Liutauras Vilda
  • Paul Clapham
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
  • Mike London

Problem with SecurityContextHolder.getContext().getAuthentication()

Ranch Hand
Posts: 502
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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.
Consider Paul's rocket mass heater.
    Bookmark Topic Watch Topic
  • New Topic