#Spring Security default /login endpoint returns 404 "No static resource login."

7 messages · Page 1 of 1 (latest)

lyric rover
#

My question has too many characters to post directly to Discord so here it is on StackOverflow: https://stackoverflow.com/questions/77958701/spring-security-default-login-endpoint-returns-404-no-static-resource-login

The gist is this:

  • I've created Authentication and Authorization using JWT in cookies.
  • My own custom classes include: CustomAuthenticationProvider, AuthenticationFilter, JWTGeneratorFilter, JWTAuthorizationFilter.
  • To reduce the code as much as possible to find the error, I have removed everything except the AuthenticationFilter.
  • I make a POST request, content-type JSON, etc, to localhost localhost:8080/login . I have not created any controller handler methods or anything with the /login endpoint, I haven't touched /login.
  • The user is authenticated correctly, the cookie is correctly assigned the JWT in the response.
  • Near the end of the filter chain something goes wrong and I get the following response:
{
    "type": "about:blank",
    "title": "Not Found",
    "status": 404,
    "detail": "No static resource login.",
    "instance": "/login"
}
  • If I make a login request with incorrect credentials then it correctly returns my custom BadCredentials response.

There's lots more information in the SO thread that can't fit here.

hot acornBOT
#

This post has been reserved for your question.

Hey @lyric rover! Please use /close or the Close Post button above when your problem is solved. Please remember to follow the help guidelines. This post will be automatically closed after 300 minutes of inactivity.

TIP: Narrow down your issue to simple and precise questions to maximize the chance that others will reply in here.

lyric rover
#

Bump

lyric rover
#

Bump

hot acornBOT
#

💤 Post marked as dormant

This post has been inactive for over 300 minutes, thus, it has been archived.
If your question was not answered yet, feel free to re-open this post or create a new one.
In case your post is not getting any attention, you can try to use /help ping.
Warning: abusing this will result in moderative actions taken against you.

lyric rover
#

Re-open