Class ELRequestMatcher
- java.lang.Object
-
- org.springframework.security.web.util.matcher.ELRequestMatcher
-
- All Implemented Interfaces:
RequestMatcher
public class ELRequestMatcher extends java.lang.Object implements RequestMatcher
A RequestMatcher implementation which uses a SpEL expressionWith the default EvaluationContext (
ELRequestMatcherContext
) you can usehasIpAdress()
andhasHeader()
See
DelegatingAuthenticationEntryPoint
for an example configuration.- Since:
- 3.0.2
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.springframework.security.web.util.matcher.RequestMatcher
RequestMatcher.MatchResult
-
-
Constructor Summary
Constructors Constructor Description ELRequestMatcher(java.lang.String el)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.springframework.expression.EvaluationContext
createELContext(javax.servlet.http.HttpServletRequest request)
Subclasses can override this methode if they want to use a different EL root contextboolean
matches(javax.servlet.http.HttpServletRequest request)
Decides whether the rule implemented by the strategy matches the supplied request.java.lang.String
toString()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.springframework.security.web.util.matcher.RequestMatcher
matcher
-
-
-
-
Method Detail
-
matches
public boolean matches(javax.servlet.http.HttpServletRequest request)
Description copied from interface:RequestMatcher
Decides whether the rule implemented by the strategy matches the supplied request.- Specified by:
matches
in interfaceRequestMatcher
- Parameters:
request
- the request to check for a match- Returns:
- true if the request matches, false otherwise
-
createELContext
public org.springframework.expression.EvaluationContext createELContext(javax.servlet.http.HttpServletRequest request)
Subclasses can override this methode if they want to use a different EL root context- Returns:
- EL root context which is used to evaluate the expression
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
-