Class IridaApiSecurityConfig
- java.lang.Object
-
- org.springframework.security.config.annotation.method.configuration.GlobalMethodSecurityConfiguration
-
- ca.corefacility.bioinformatics.irida.config.security.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
-
-
Field Summary
Fields Modifier and Type Field Description static int
METHOD_SECURITY_ORDER
-
Constructor Summary
Constructors Constructor Description IridaApiSecurityConfig()
-
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()
DefaultDefaultWebSecurityExpressionHandler
.-
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
-
-
-
-
Field Detail
-
METHOD_SECURITY_ORDER
public static final int METHOD_SECURITY_ORDER
- See Also:
- Constant Field Values
-
-
Method Detail
-
createExpressionHandler
protected org.springframework.security.access.expression.method.MethodSecurityExpressionHandler createExpressionHandler()
- Overrides:
createExpressionHandler
in classorg.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 classorg.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 classorg.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()
DefaultDefaultWebSecurityExpressionHandler
. 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.
-
-