Relative Content

Tag Archive for spring-bootspring-security

Spring Security: Login page keeps redirecting to itself

i’m basically a beginner when it comes to spring security and i’m trying to apply a certain filter that would help me check for the device fingerprint on any request that would require authentication, but the problem is the /login page that is default to spring security keeps redirecting to itself when i try to request a url that does need authentication, here’s my FilterChain:

Change default login page using default view in sprinbgoot security

I’m using Spring boot 3.2.2 and trying to use login page for authentication two times in two different way. I mean I need two authentications for different resources. I’m trying to customize loginPage and LoginUrlPRocessor to use different addresses bot I’m not need to change the view of that pages, because I’m only use its endpoint to authenticate. It only works for /login. When I’m trying to change that address i doesn’t work. One of filterChain is below, I’m trying to customize authentication endpoint but it only works on /login

CSRF Spring Security 6 Login Single Page Application

Using Spring Security 6 with Javascript Single Page Application. Calling the login Url does not push through the login as it always return status. I followed the configuration for Spring CSRF https://docs.spring.io/spring-security/reference/servlet/exploits/csrf.html#csrf-integration-javascript-spa
But, it never goes to my api for login/authentication. Below is my sample configuration.

Access denied even with the AnonymousAuthenticationFilter

I’m trying to create an API server that has some endpoints that are accessible without authentication and some endpoints that requires authentication. I want to configure Spring Security to authenticate the user when possible, and still let the request through even when it cannot so that controller/service layer handle that.