Class SecurityConfiguration
- java.lang.Object
-
- org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
-
- cz.zcu.students.cacha.bp_server.security.SecurityConfiguration
-
- All Implemented Interfaces:
org.springframework.security.config.annotation.SecurityConfigurer<javax.servlet.Filter,org.springframework.security.config.annotation.web.builders.WebSecurity>
,org.springframework.security.config.annotation.web.WebSecurityConfigurer<org.springframework.security.config.annotation.web.builders.WebSecurity>
@Configuration @EnableWebSecurity @EnableGlobalMethodSecurity(securedEnabled=true, jsr250Enabled=true, prePostEnabled=true) public class SecurityConfiguration extends org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
Class that configurates system security
-
-
Constructor Summary
Constructors Constructor Description SecurityConfiguration()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected org.springframework.security.authentication.AuthenticationManager
authenticationManager()
Creates bean of AuthenticationManagerprotected void
configure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth)
Sets user service and password encoderprotected void
configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
Configurates spring security and set detail restrictions for system endpoints-
Methods inherited from class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
authenticationManagerBean, configure, getApplicationContext, getHttp, init, setApplicationContext, setAuthenticationConfiguration, setContentNegotationStrategy, setObjectPostProcessor, setTrustResolver, userDetailsService, userDetailsServiceBean
-
-
-
-
Method Detail
-
configure
protected void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) throws Exception
Configurates spring security and set detail restrictions for system endpoints- Overrides:
configure
in classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
- Parameters:
http
- security- Throws:
Exception
- Exception
-
configure
protected void configure(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth) throws Exception
Sets user service and password encoder- Overrides:
configure
in classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
- Parameters:
auth
- auth builder- Throws:
Exception
- exception
-
authenticationManager
@Bean("org.springframework.security.authenticationManager") protected org.springframework.security.authentication.AuthenticationManager authenticationManager() throws Exception
Creates bean of AuthenticationManager- Overrides:
authenticationManager
in classorg.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
- Returns:
- AuthenticationManager
- Throws:
Exception
- exception
-
-