Securitycontextholder.getcontext is null
Your localUser is null. So the auth become null. So no authentication object has been added to the security context. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams? Collectives on Stack Overflow. Learn more. Asked 7 years, 10 months ago. Active 3 months ago. Viewed 54k times. Rajesh Wadhwa Rajesh Wadhwa 2 2 gold badges 7 7 silver badges 14 14 bronze badges. May be that is the reason you are getting null.
Also a null password I think that's also illegal. Maybe if you show the stack trace? Log your session. Do you want to bypass the security only for some particular pages or particular user or for all? I solved this by passing user object to UsernamePasswordAuthenticationToken constructor instead of username in place of principal. Stack Overflow for Teams — Collaborate and share knowledge with a private group. Create a free Team What is Teams?
Collectives on Stack Overflow. Learn more. Asked 3 years, 1 month ago. Active 11 months ago. Viewed 5k times. Alexander Mujirishvili Alexander Mujirishvili 4 4 silver badges 11 11 bronze badges.
Why are you searching by username and password? You should search by username only. Add a comment. Active Oldest Votes. Arnas Arnas 5 5 silver badges 8 8 bronze badges. Add a comment. Active Oldest Votes. Community Bot 1 1 1 silver badge. The Overflow Blog. Stack Gives Back Safety in numbers: crowdsourcing data on nefarious IP addresses. Featured on Meta. New post summary designs on greatest hits now, everywhere else eventually. Linked
0コメント