Tabnine Logo
HttpSecurityBuilder.addFilterBefore
Code IndexAdd Tabnine to your IDE (free)

How to use
addFilterBefore
method
in
org.springframework.security.config.annotation.web.HttpSecurityBuilder

Best Java code snippets using org.springframework.security.config.annotation.web.HttpSecurityBuilder.addFilterBefore (Showing top 1 results out of 315)

origin: codeabovelab/haven-platform

@Override
public void configure(H http) throws Exception {
  AuthenticationTokenFilter af = getAuthenticationFilter();
  if(authenticationDetailsSource != null) {
    af.setAuthenticationDetailsSource(authenticationDetailsSource);
  }
  af.setAuthenticationManager(http.getSharedObject(AuthenticationManager.class));
  af.setAuthenticationSuccessHandler(new AuthenticationStubSuccessHandler());
  SessionAuthenticationStrategy sessionAuthenticationStrategy = http.getSharedObject(SessionAuthenticationStrategy.class);
  if(sessionAuthenticationStrategy != null) {
    af.setSessionAuthenticationStrategy(sessionAuthenticationStrategy);
  }
  AuthenticationTokenFilter filter = postProcess(af);
  filter.setContinueChainAfterSuccessfulAuthentication(true);
  http.addFilterBefore(filter, BasicAuthenticationFilter.class);
}
org.springframework.security.config.annotation.webHttpSecurityBuilderaddFilterBefore

Javadoc

Allows adding a Filter before one of the known Filter classes. The known Filter instances are either a Filter listed in #addFilter(Filter) or a Filter that has already been added using #addFilterAfter(Filter,Class) or #addFilterBefore(Filter,Class).

Popular methods of HttpSecurityBuilder

  • getSharedObject
    Gets a shared Object. Note that object heirarchies are not considered.
  • addFilter
    Adds a Filter that must be an instance of or extend one of the Filters provided within the Security
  • authenticationProvider
    Allows adding an additional AuthenticationProvider to be used
  • getConfigurer
    Gets the SecurityConfigurer by its class name ornull if not found. Note that object hierarchies are
  • removeConfigurer
    Removes the SecurityConfigurer by its class name ornull if not found. Note that object hierarchies a
  • setSharedObject
    Sets an object that is shared by multiple SecurityConfigurer.
  • getAuthenticationManager

Popular in Java

  • Parsing JSON documents to java classes using gson
  • getResourceAsStream (ClassLoader)
  • onCreateOptionsMenu (Activity)
  • startActivity (Activity)
  • BufferedImage (java.awt.image)
    The BufferedImage subclass describes an java.awt.Image with an accessible buffer of image data. All
  • FileInputStream (java.io)
    An input stream that reads bytes from a file. File file = ...finally if (in != null) in.clos
  • System (java.lang)
    Provides access to system-related information and resources including standard input and output. Ena
  • Connection (java.sql)
    A connection represents a link from a Java application to a database. All SQL statements and results
  • Calendar (java.util)
    Calendar is an abstract base class for converting between a Date object and a set of integer fields
  • GregorianCalendar (java.util)
    GregorianCalendar is a concrete subclass of Calendarand provides the standard calendar used by most
  • Best plugins for Eclipse
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