SEC-2302: Provide beforeSpringSecurityFilterChain hook
This allows inserting filters before the springSecurityFilterChain.
This commit is contained in:
parent
88f41cdf62
commit
b591881e95
|
|
@ -108,6 +108,7 @@ public abstract class AbstractSecurityWebApplicationInitializer implements WebAp
|
||||||
*/
|
*/
|
||||||
public final void onStartup(ServletContext servletContext)
|
public final void onStartup(ServletContext servletContext)
|
||||||
throws ServletException {
|
throws ServletException {
|
||||||
|
beforeSpringSecurityFilterChain(servletContext);
|
||||||
if(configurationClasses != null) {
|
if(configurationClasses != null) {
|
||||||
AnnotationConfigWebApplicationContext rootAppContext = new AnnotationConfigWebApplicationContext();
|
AnnotationConfigWebApplicationContext rootAppContext = new AnnotationConfigWebApplicationContext();
|
||||||
rootAppContext.register(configurationClasses);
|
rootAppContext.register(configurationClasses);
|
||||||
|
|
@ -283,6 +284,14 @@ public abstract class AbstractSecurityWebApplicationInitializer implements WebAp
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Invoked before the springSecurityFilterChain is added.
|
||||||
|
* @param servletContext the {@link ServletContext}
|
||||||
|
*/
|
||||||
|
protected void beforeSpringSecurityFilterChain(ServletContext servletContext) {
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Invoked after the springSecurityFilterChain is added.
|
* Invoked after the springSecurityFilterChain is added.
|
||||||
* @param servletContext the {@link ServletContext}
|
* @param servletContext the {@link ServletContext}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue