Win a copy of Java Mock Exams (software) this week in the Programmer Certification (OCPJP) forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

Spring Security redirects correct user to unauthorized page

 
Partheban Udayakumar
Ranch Hand
Posts: 496
AngularJS Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,

I am currently working on a project with Spring 4, Spring Security 4, Hibernate 4, MySQL 5. When I login with the user credentials, it logs in but takes me to unauthenticated user page. I tried debugging the code in eclipse but I am not able to find out why it goes to the unauthenticated user page. We are using 4 different types of users for the project, so the database design given to me was a little different. I have added it as an image below.

Here are the codes I have used

SpringSecurityConfig:


MyUserDetailsService



All the values from the database are fetched correctly and passed in the UserDetails (details) object. But still it gives the same result.
table.png
[Thumbnail for table.png]
 
Partheban Udayakumar
Ranch Hand
Posts: 496
AngularJS Java Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
If any one is looking for the answer, please go to this Stackoverflow answer
 
What are you doing? You are supposed to be reading this tiny ad!
the new thread boost feature brings a LOT of attention to your favorite threads
https://coderanch.com/t/674455/Thread-Boost-feature
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!