|
|
|
@ -118,7 +118,7 @@ public class GlobalMethodSecurityConfiguration |
|
|
|
* {@link MethodInterceptor}. |
|
|
|
* {@link MethodInterceptor}. |
|
|
|
* </p> |
|
|
|
* </p> |
|
|
|
* |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return the {@link MethodInterceptor}. |
|
|
|
* @throws Exception |
|
|
|
* @throws Exception |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
@ -204,7 +204,7 @@ public class GlobalMethodSecurityConfiguration |
|
|
|
* {@link AfterInvocationManager} |
|
|
|
* {@link AfterInvocationManager} |
|
|
|
* </p> |
|
|
|
* </p> |
|
|
|
* |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return the {@link AfterInvocationManager} to use |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected AfterInvocationManager afterInvocationManager() { |
|
|
|
protected AfterInvocationManager afterInvocationManager() { |
|
|
|
if (prePostEnabled()) { |
|
|
|
if (prePostEnabled()) { |
|
|
|
@ -225,7 +225,7 @@ public class GlobalMethodSecurityConfiguration |
|
|
|
* Provide a custom {@link RunAsManager} for the default implementation of |
|
|
|
* Provide a custom {@link RunAsManager} for the default implementation of |
|
|
|
* {@link #methodSecurityInterceptor()}. The default is null. |
|
|
|
* {@link #methodSecurityInterceptor()}. The default is null. |
|
|
|
* |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return the {@link RunAsManager} to use |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected RunAsManager runAsManager() { |
|
|
|
protected RunAsManager runAsManager() { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
@ -241,7 +241,7 @@ public class GlobalMethodSecurityConfiguration |
|
|
|
* <li>{@link AuthenticatedVoter}</li> |
|
|
|
* <li>{@link AuthenticatedVoter}</li> |
|
|
|
* </ul> |
|
|
|
* </ul> |
|
|
|
* |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return the {@link AccessDecisionManager} to use |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected AccessDecisionManager accessDecisionManager() { |
|
|
|
protected AccessDecisionManager accessDecisionManager() { |
|
|
|
List<AccessDecisionVoter<? extends Object>> decisionVoters = new ArrayList<AccessDecisionVoter<? extends Object>>(); |
|
|
|
List<AccessDecisionVoter<? extends Object>> decisionVoters = new ArrayList<AccessDecisionVoter<? extends Object>>(); |
|
|
|
@ -270,7 +270,7 @@ public class GlobalMethodSecurityConfiguration |
|
|
|
* {@link MethodSecurityExpressionHandler} |
|
|
|
* {@link MethodSecurityExpressionHandler} |
|
|
|
* </p> |
|
|
|
* </p> |
|
|
|
* |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return the {@link MethodSecurityExpressionHandler} to use |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected MethodSecurityExpressionHandler createExpressionHandler() { |
|
|
|
protected MethodSecurityExpressionHandler createExpressionHandler() { |
|
|
|
return defaultMethodExpressionHandler; |
|
|
|
return defaultMethodExpressionHandler; |
|
|
|
@ -307,7 +307,7 @@ public class GlobalMethodSecurityConfiguration |
|
|
|
* {@link #configure(AuthenticationManagerBuilder)} was not overridden, then an |
|
|
|
* {@link #configure(AuthenticationManagerBuilder)} was not overridden, then an |
|
|
|
* {@link AuthenticationManager} is attempted to be autowired by type. |
|
|
|
* {@link AuthenticationManager} is attempted to be autowired by type. |
|
|
|
* |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return the {@link AuthenticationManager} to use |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
protected AuthenticationManager authenticationManager() throws Exception { |
|
|
|
protected AuthenticationManager authenticationManager() throws Exception { |
|
|
|
if (authenticationManager == null) { |
|
|
|
if (authenticationManager == null) { |
|
|
|
@ -346,7 +346,7 @@ public class GlobalMethodSecurityConfiguration |
|
|
|
* {@link #customMethodSecurityMetadataSource()} and the attributes on |
|
|
|
* {@link #customMethodSecurityMetadataSource()} and the attributes on |
|
|
|
* {@link EnableGlobalMethodSecurity}. |
|
|
|
* {@link EnableGlobalMethodSecurity}. |
|
|
|
* |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return the {@link MethodSecurityMetadataSource} |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
public MethodSecurityMetadataSource methodSecurityMetadataSource() { |
|
|
|
public MethodSecurityMetadataSource methodSecurityMetadataSource() { |
|
|
|
@ -379,7 +379,7 @@ public class GlobalMethodSecurityConfiguration |
|
|
|
* Creates the {@link PreInvocationAuthorizationAdvice} to be used. The default is |
|
|
|
* Creates the {@link PreInvocationAuthorizationAdvice} to be used. The default is |
|
|
|
* {@link ExpressionBasedPreInvocationAdvice}. |
|
|
|
* {@link ExpressionBasedPreInvocationAdvice}. |
|
|
|
* |
|
|
|
* |
|
|
|
* @return |
|
|
|
* @return the {@link PreInvocationAuthorizationAdvice} |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Bean |
|
|
|
@Bean |
|
|
|
public PreInvocationAuthorizationAdvice preInvocationAuthorizationAdvice() { |
|
|
|
public PreInvocationAuthorizationAdvice preInvocationAuthorizationAdvice() { |
|
|
|
|