Tabnine Logo
FilterChainManager.getChainNames
Code IndexAdd Tabnine to your IDE (free)

How to use
getChainNames
method
in
org.apache.shiro.web.filter.mgt.FilterChainManager

Best Java code snippets using org.apache.shiro.web.filter.mgt.FilterChainManager.getChainNames (Showing top 3 results out of 315)

origin: apache/shiro

public FilterChain getChain(ServletRequest request, ServletResponse response, FilterChain originalChain) {
  FilterChainManager filterChainManager = getFilterChainManager();
  if (!filterChainManager.hasChains()) {
    return null;
  }
  String requestURI = getPathWithinApplication(request);
  //the 'chain names' in this implementation are actually path patterns defined by the user.  We just use them
  //as the chain name for the FilterChainManager's requirements
  for (String pathPattern : filterChainManager.getChainNames()) {
    // If the path does match, then pass on to the subclass implementation for specific checks:
    if (pathMatches(pathPattern, requestURI)) {
      if (log.isTraceEnabled()) {
        log.trace("Matched path pattern [" + pathPattern + "] for requestURI [" + requestURI + "].  " +
            "Utilizing corresponding filter chain...");
      }
      return filterChainManager.proxy(originalChain, pathPattern);
    }
  }
  return null;
}
origin: tomsun28/bootshiro

} else {
  String requestURI = this.getPathWithinApplication(request);
  Iterator var6 = filterChainManager.getChainNames().iterator();
origin: be.c4j.ee.security.octopus/octopus-core

  public FilterChain getChain(ServletRequest request, ServletResponse response, FilterChain originalChain) {
    FilterChainManager filterChainManager = getFilterChainManager();
    if (!filterChainManager.hasChains()) {
      return null;
    }

    String requestURI = getPathWithinApplication(request);

    //the 'chain names' in this implementation are actually path patterns defined by the user.  We just use them
    //as the chain name for the FilterChainManager's requirements
    for (String pathPattern : filterChainManager.getChainNames()) {

      // If the path does match, then pass on to the subclass implementation for specific checks:
      if (pathMatches(pathPattern, requestURI)) {
        if (log.isTraceEnabled()) {
          log.trace("Matched path pattern [" + pathPattern + "] for requestURI [" + requestURI + "].  " +
              "Utilizing corresponding filter chain...");
        }

        // This is the only change we have made in this method.
        request.setAttribute(OCTOPUS_CHAIN_NAME, pathPattern);
        return filterChainManager.proxy(originalChain, pathPattern);
      }
    }

    return null;
  }
}
org.apache.shiro.web.filter.mgtFilterChainManagergetChainNames

Javadoc

Returns the names of all configured chains or an empty Set if no chains have been configured.

Popular methods of FilterChainManager

  • hasChains
  • proxy
  • addFilter
    Adds a filter to the 'pool' of available filters that can be used when #addToChain(String,String,Str
  • createChain
    Creates a filter chain for the given chainName with the specified chainDefinitionString.CONVENTIONAL
  • getFilters
    Returns the pool of available Filters managed by this manager, keyed by name.

Popular in Java

  • Making http post requests using okhttp
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • runOnUiThread (Activity)
  • scheduleAtFixedRate (ScheduledExecutorService)
  • HttpURLConnection (java.net)
    An URLConnection for HTTP (RFC 2616 [http://tools.ietf.org/html/rfc2616]) used to send and receive d
  • Random (java.util)
    This class provides methods that return pseudo-random values.It is dangerous to seed Random with the
  • Modifier (javassist)
    The Modifier class provides static methods and constants to decode class and member access modifiers
  • FileUtils (org.apache.commons.io)
    General file manipulation utilities. Facilities are provided in the following areas: * writing to a
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Join (org.hibernate.mapping)
  • 21 Best IntelliJ Plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimAtomGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyStudentsTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now