Class 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
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.springframework.security.authentication.AuthenticationManager authenticationManager()
      Creates bean of AuthenticationManager
      protected void configure​(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth)
      Sets user service and password encoder
      protected 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
    • Constructor Detail

      • SecurityConfiguration

        public SecurityConfiguration()
    • 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 class org.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 class org.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 class org.springframework.security.config.annotation.web.configuration.WebSecurityConfigurerAdapter
        Returns:
        AuthenticationManager
        Throws:
        Exception - exception