mirror of
https://github.com/spring-projects/spring-security.git
synced 2025-03-05 12:59:22 +00:00
Documentation SecurityConfig->WebSecurityConfig
Rename SecurityConfig to WebSecurityConfig in the documentation. Fixes gh-153
This commit is contained in:
parent
6b436ff409
commit
9fa2c64737
@ -468,7 +468,7 @@ import org.springframework.security.config.annotation.authentication.builders.*;
|
||||
import org.springframework.security.config.annotation.web.configuration.*;
|
||||
|
||||
@EnableWebSecurity
|
||||
public class SecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
|
||||
|
||||
@Autowired
|
||||
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
|
||||
|
||||
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]
|
||||
----
|
||||
@ -521,7 +521,7 @@ public class SecurityWebApplicationInitializer
|
||||
extends AbstractSecurityWebApplicationInitializer {
|
||||
|
||||
public SecurityWebApplicationInitializer() {
|
||||
super(SecurityConfig.class);
|
||||
super(WebSecurityConfig.class);
|
||||
}
|
||||
}
|
||||
----
|
||||
@ -529,7 +529,7 @@ public class SecurityWebApplicationInitializer
|
||||
The `SecurityWebApplicationInitializer` will do the following things:
|
||||
|
||||
* 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
|
||||
|
||||
@ -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]]
|
||||
[source,java]
|
||||
@ -555,7 +555,7 @@ public class MvcWebApplicationInitializer extends
|
||||
|
||||
@Override
|
||||
protected Class<?>[] getRootConfigClasses() {
|
||||
return new Class[] { SecurityConfig.class };
|
||||
return new Class[] { WebSecurityConfig.class };
|
||||
}
|
||||
|
||||
// ... other overrides ...
|
||||
@ -565,7 +565,7 @@ public class MvcWebApplicationInitializer extends
|
||||
[[jc-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]
|
||||
----
|
||||
|
Loading…
x
Reference in New Issue
Block a user