79258047

Date: 2024-12-06 12:53:54
Score: 2
Natty:
Report link

If Spring Security's authentication fails, userDetails will not be injected, and Spring Security will redirect to the failure URL (/login?error). Perhaps your test setup does not authenticates correctly? Try to log in your controller if you even reach there (if you do auth works). Then check/debug what your authService (authService.auth(userDetails.getId())) does.

Reasons:
  • No code block (0.5):
  • Contains question mark (0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: embuc