Class IridaApiSecurityConfig

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.beans.factory.BeanFactoryAware, org.springframework.beans.factory.SmartInitializingSingleton, org.springframework.context.annotation.ImportAware

    @Configuration
    @EnableGlobalMethodSecurity(prePostEnabled=true,
                                order=2147483647)
    @ComponentScan(basePackages="ca.corefacility.bioinformatics.irida.security")
    public class IridaApiSecurityConfig
    extends org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration
    Configuration for IRIDA's spring security modules
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      org.springframework.security.authentication.AuthenticationManager authenticationManager()  
      org.springframework.security.authentication.AuthenticationProvider authenticationProvider()  
      protected void configure​(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth)  
      protected org.springframework.security.access.expression.method.MethodSecurityExpressionHandler createExpressionHandler()  
      org.apache.oltu.oauth2.client.OAuthClient oAuthClient()  
      org.springframework.security.crypto.password.PasswordEncoder passwordEncoder()  
      org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler webSecurityExpressionHandler()
      Default DefaultWebSecurityExpressionHandler.
      • Methods inherited from class org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration

        accessDecisionManager, afterInvocationManager, afterSingletonsInstantiated, customMethodSecurityMetadataSource, getExpressionHandler, methodSecurityInterceptor, methodSecurityMetadataSource, preInvocationAuthorizationAdvice, runAsManager, setBeanFactory, setImportMetadata, setMethodSecurityExpressionHandler, setObjectPostProcessor
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

    • Constructor Detail

      • IridaApiSecurityConfig

        public IridaApiSecurityConfig()
    • Method Detail

      • createExpressionHandler

        protected org.springframework.security.access.expression.method.MethodSecurityExpressionHandler createExpressionHandler()
        Overrides:
        createExpressionHandler in class org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration
      • configure

        protected void configure​(org.springframework.security.config.annotation.authentication.builders.AuthenticationManagerBuilder auth)
                          throws java.lang.Exception
        Overrides:
        configure in class org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration
        Throws:
        java.lang.Exception
      • authenticationProvider

        @Bean
        public org.springframework.security.authentication.AuthenticationProvider authenticationProvider()
      • authenticationManager

        @Bean(name="userAuthenticationManager")
        public org.springframework.security.authentication.AuthenticationManager authenticationManager()
                                                                                                throws java.lang.Exception
        Overrides:
        authenticationManager in class org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration
        Throws:
        java.lang.Exception
      • passwordEncoder

        @Bean
        public org.springframework.security.crypto.password.PasswordEncoder passwordEncoder()
      • oAuthClient

        @Bean
        public org.apache.oltu.oauth2.client.OAuthClient oAuthClient()
      • webSecurityExpressionHandler

        @Bean
        public org.springframework.security.web.access.expression.DefaultWebSecurityExpressionHandler webSecurityExpressionHandler()
        Default DefaultWebSecurityExpressionHandler. This is used by Thymeleaf's Spring Security plugin, and isn't actually used anywhere in the back-end, but it needs to be in the back-end configuration classes because the Thymeleaf plugin looks for this expression handler in the ROOT context instead of in the context that it's running in.
        Returns:
        the web security expression handler.