Documentation SecurityConfig->WebSecurityConfig

Rename SecurityConfig to WebSecurityConfig in the documentation.

Fixes gh-153
This commit is contained in:
Shannon Carey 2016-06-17 16:55:46 -05:00 committed by Rob Winch
parent 6b436ff409
commit 9fa2c64737

View File

@ -468,7 +468,7 @@ import org.springframework.security.config.annotation.authentication.builders.*;
import org.springframework.security.config.annotation.web.configuration.*; import org.springframework.security.config.annotation.web.configuration.*;
@EnableWebSecurity @EnableWebSecurity
public class SecurityConfig extends WebSecurityConfigurerAdapter { public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
@Autowired @Autowired
public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception { public void configureGlobal(AuthenticationManagerBuilder auth) throws Exception {
@ -511,7 +511,7 @@ The next step is to register the `springSecurityFilterChain` with the war. This
==== AbstractSecurityWebApplicationInitializer without Existing Spring ==== AbstractSecurityWebApplicationInitializer without Existing Spring
If you are not using Spring or Spring MVC, you will need to pass in the `SecurityConfig` into the superclass to ensure the configuration is picked up. You can find an example below: If you are not using Spring or Spring MVC, you will need to pass in the `WebSecurityConfig` into the superclass to ensure the configuration is picked up. You can find an example below:
[source,java] [source,java]
---- ----
@ -521,7 +521,7 @@ public class SecurityWebApplicationInitializer
extends AbstractSecurityWebApplicationInitializer { extends AbstractSecurityWebApplicationInitializer {
public SecurityWebApplicationInitializer() { public SecurityWebApplicationInitializer() {
super(SecurityConfig.class); super(WebSecurityConfig.class);
} }
} }
---- ----
@ -529,7 +529,7 @@ public class SecurityWebApplicationInitializer
The `SecurityWebApplicationInitializer` will do the following things: The `SecurityWebApplicationInitializer` will do the following things:
* Automatically register the springSecurityFilterChain Filter for every URL in your application * Automatically register the springSecurityFilterChain Filter for every URL in your application
* Add a ContextLoaderListener that loads the <<jc-hello-wsca,SecurityConfig>>. * Add a ContextLoaderListener that loads the <<jc-hello-wsca,WebSecurityConfig>>.
==== AbstractSecurityWebApplicationInitializer with Spring MVC ==== AbstractSecurityWebApplicationInitializer with Spring MVC
@ -545,7 +545,7 @@ public class SecurityWebApplicationInitializer
} }
---- ----
This would simply only register the springSecurityFilterChain Filter for every URL in your application. After that we would ensure that `SecurityConfig` was loaded in our existing ApplicationInitializer. For example, if we were using Spring MVC it would be added in the `getRootConfigClasses()` This would simply only register the springSecurityFilterChain Filter for every URL in your application. After that we would ensure that `WebSecurityConfig` was loaded in our existing ApplicationInitializer. For example, if we were using Spring MVC it would be added in the `getRootConfigClasses()`
[[message-web-application-inititializer-java]] [[message-web-application-inititializer-java]]
[source,java] [source,java]
@ -555,7 +555,7 @@ public class MvcWebApplicationInitializer extends
@Override @Override
protected Class<?>[] getRootConfigClasses() { protected Class<?>[] getRootConfigClasses() {
return new Class[] { SecurityConfig.class }; return new Class[] { WebSecurityConfig.class };
} }
// ... other overrides ... // ... other overrides ...
@ -565,7 +565,7 @@ public class MvcWebApplicationInitializer extends
[[jc-httpsecurity]] [[jc-httpsecurity]]
=== HttpSecurity === HttpSecurity
Thus far our <<jc-hello-wsca,SecurityConfig>> only contains information about how to authenticate our users. How does Spring Security know that we want to require all users to be authenticated? How does Spring Security know we want to support form based authentication? The reason for this is that the `WebSecurityConfigurerAdapter` provides a default configuration in the `configure(HttpSecurity http)` method that looks like: Thus far our <<jc-hello-wsca,WebSecurityConfig>> only contains information about how to authenticate our users. How does Spring Security know that we want to require all users to be authenticated? How does Spring Security know we want to support form based authentication? The reason for this is that the `WebSecurityConfigurerAdapter` provides a default configuration in the `configure(HttpSecurity http)` method that looks like:
[source,java] [source,java]
---- ----