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
  • setRequestProperty (URLConnection)
  • orElseThrow (Optional)
    Return the contained value, if present, otherwise throw an exception to be created by the provided s
  • onCreateOptionsMenu (Activity)
  • PrintWriter (java.io)
    Wraps either an existing OutputStream or an existing Writerand provides convenience methods for prin
  • Queue (java.util)
    A collection designed for holding elements prior to processing. Besides basic java.util.Collection o
  • TimerTask (java.util)
    The TimerTask class represents a task to run at a specified time. The task may be run once or repeat
  • ConcurrentHashMap (java.util.concurrent)
    A plug-in replacement for JDK1.5 java.util.concurrent.ConcurrentHashMap. This version is based on or
  • DataSource (javax.sql)
    An interface for the creation of Connection objects which represent a connection to a database. This
  • JPanel (javax.swing)
  • Top plugins for WebStorm
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

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