Module com.erudika.para.server
Package com.erudika.para.server.security
Class CsrfProtectionRequestMatcher
java.lang.Object
com.erudika.para.server.security.CsrfProtectionRequestMatcher
- All Implemented Interfaces:
org.springframework.security.web.util.matcher.RequestMatcher
public final class CsrfProtectionRequestMatcher
extends Object
implements org.springframework.security.web.util.matcher.RequestMatcher
CSRF protection matcher - matches POST, PUT, PATCH, DELETE requests that are not in the ignored list and not
API or authentication requests. These requests will be rejected if they don't contain a valid CSRF token.
- Author:
- Alex Bogdanovski [[email protected]]
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.springframework.security.web.util.matcher.RequestMatcher
org.springframework.security.web.util.matcher.RequestMatcher.MatchResult
-
Field Summary
Modifier and TypeFieldDescriptionstatic final org.springframework.security.web.util.matcher.RequestMatcher
An instance of this class. -
Method Summary
Modifier and TypeMethodDescriptionboolean
matches
(jakarta.servlet.http.HttpServletRequest request) Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface org.springframework.security.web.util.matcher.RequestMatcher
matcher
-
Field Details
-
INSTANCE
public static final org.springframework.security.web.util.matcher.RequestMatcher INSTANCEAn instance of this class.
-
-
Method Details
-
matches
public boolean matches(jakarta.servlet.http.HttpServletRequest request) - Specified by:
matches
in interfaceorg.springframework.security.web.util.matcher.RequestMatcher
-