org.springframework.security.web.util
Class ELRequestMatcher

java.lang.Object
  extended by org.springframework.security.web.util.ELRequestMatcher
All Implemented Interfaces:
RequestMatcher

public class ELRequestMatcher
extends Object
implements RequestMatcher

A RequestMatcher implementation which uses a SpEL expression

With the default EvalutationContext (ELRequestMatcherContext) you can use hasIpAdress() and hasHeader()

See DelegatingAuthenticationEntryPoint for a example configuration.

Since:
3.0.2

Constructor Summary
ELRequestMatcher(String el)
           
 
Method Summary
 EvaluationContext createELContext(javax.servlet.http.HttpServletRequest request)
          Subclasses can override this methode if they want to use a different EL root context
 boolean matches(javax.servlet.http.HttpServletRequest request)
          Decides whether the rule implemented by the strategy matches the supplied request.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ELRequestMatcher

public ELRequestMatcher(String el)
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 interface RequestMatcher
Parameters:
request - the request to check for a match
Returns:
true if the request matches, false otherwise

createELContext

public 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