@Configuration @EnableGlobalMethodSecurity(prePostEnabled=true, securedEnabled=true, jsr250Enabled=true, proxyTargetClass=true) @EnableWebSecurity public static class AdminWebApplication.WebSecurityConfiguration extends Object
AuthenticationManager and enabled the global method security and
Web MVC security. The actual configuration of Web MVC security is handled
by AdminWebApplication.WebSecurityConfiguration.AdminApiHttpSecurityConfiguration and
AdminWebApplication.WebSecurityConfiguration.AdminUiHttpSecurityConfiguration.| Modifier and Type | Class and Description |
|---|---|
static class |
AdminWebApplication.WebSecurityConfiguration.AdminApiHttpSecurityConfiguration
Spring security configuration for the
/admin/api URI. |
static class |
AdminWebApplication.WebSecurityConfiguration.AdminUiHttpSecurityConfiguration
Security configuration for the
/admin/ui/ URI. |
| Constructor and Description |
|---|
WebSecurityConfiguration() |
| Modifier and Type | Method and Description |
|---|---|
AuthenticationProvider |
authenticationProvider(PasswordEncoder passwordEncoder,
UserDetailsService userDetailsService)
Creates the authentication provider used by this web application.
|
void |
configureAuthenticationManager(AuthenticationManagerBuilder auth)
Configures the
AuthenticationManager. |
@Bean public AuthenticationProvider authenticationProvider(PasswordEncoder passwordEncoder, UserDetailsService userDetailsService) throws Exception
UserCache in order to reduce the latency
when authentication requests are very frequent (e.g. when HTTP Basic
Authentication is being used). This method is typically invoked by
the Spring container, passing references to the dependencies that
point to the respective beans in the parent context.passwordEncoder - password encoder to be used for authentication. Typically,
this parameter is automatically filled with the correct
instance by the Spring container.userDetailsService - user details service to be used for authentication.
Typically, this parameter is automatically filled with the
correct instance by the Spring container.Exception - if a problem prevents the creation of the authentication
provider.@Autowired public void configureAuthenticationManager(AuthenticationManagerBuilder auth) throws Exception
AuthenticationManager. This method is invoked
by the container when the AuthenticationManager is created.
This is safe, because this class is annotated with
EnableGlobalMethodSecurity and EnableWebSecurity.auth - the builder that is used for configuring the
AuthenticationManager.Exception - if the configuration of the authentication manager fails.Copyright © 2011–2017 aquenos GmbH. All rights reserved.