Package org.springframework.security.access.intercept.aopalliance

# Class MethodSecurityInterceptor

java.lang.Object
org.springframework.security.access.intercept.AbstractSecurityInterceptor
org.springframework.security.access.intercept.aopalliance.MethodSecurityInterceptor

All Implemented Interfaces:
  `org.aopalliance.aop.Advice`, `org.aopalliance.intercept.Interceptor`, `org.aopalliance.intercept.MethodInterceptor`, `org.springframework.beans.factory.Aware`, `org.springframework.beans.factory.InitializingBean`, `org.springframework.context.ApplicationEventPublisherAware`, `org.springframework.context.MessageSourceAware`

Direct Known Subclasses:
  `AspectJMethodSecurityInterceptor`

@Deprecated public class MethodSecurityInterceptor extends AbstractSecurityInterceptor implements org.aopalliance.intercept.MethodInterceptor
Deprecated.
Please use `AuthorizationManagerBeforeMethodInterceptor` and `AuthorizationManagerAfterMethodInterceptor` instead
Provides security interception of AOP Alliance based method invocations.

The `SecurityMetadataSource` required by this security interceptor is of type `MethodSecurityMetadataSource`. This is shared with the AspectJ based security interceptor (`AspectJSecurityInterceptor`), since both work with Java `Method`s.

Refer to `AbstractSecurityInterceptor` for details on the workflow.

## Field Summary

### Fields inherited from class org.springframework.security.access.intercept.AbstractSecurityInterceptor

`logger, messages`

## Constructor Summary

Constructors
Constructor
Description
`MethodSecurityInterceptor()`
Deprecated.

## Method Summary

Modifier and Type
Method
Description
`Class<?>`
`getSecureObjectClass()`
Deprecated.
Indicates the type of secure objects the subclass will be presenting to the abstract parent for processing.
`MethodSecurityMetadataSource`
`getSecurityMetadataSource()`
Deprecated.
`Object`
`invoke(org.aopalliance.intercept.MethodInvocation mi)`
Deprecated.
This method should be used to enforce security on a `MethodInvocation`.
`SecurityMetadataSource`
`obtainSecurityMetadataSource()`
Deprecated.
`void`
`setSecurityMetadataSource(MethodSecurityMetadataSource newSource)`
Deprecated.

### Methods inherited from class org.springframework.security.access.intercept.AbstractSecurityInterceptor

`afterInvocation, afterPropertiesSet, beforeInvocation, finallyInvocation, getAccessDecisionManager, getAfterInvocationManager, getAuthenticationManager, getRunAsManager, isAlwaysReauthenticate, isRejectPublicInvocations, isValidateConfigAttributes, setAccessDecisionManager, setAfterInvocationManager, setAlwaysReauthenticate, setApplicationEventPublisher, setAuthenticationManager, setMessageSource, setPublishAuthorizationSuccess, setRejectPublicInvocations, setRunAsManager, setSecurityContextHolderStrategy, setValidateConfigAttributes`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Constructor Details

### MethodSecurityInterceptor

public MethodSecurityInterceptor()
Deprecated.

## Method Details

### getSecureObjectClass

public Class<?> getSecureObjectClass()
Deprecated.
Description copied from class: `AbstractSecurityInterceptor`
Indicates the type of secure objects the subclass will be presenting to the abstract parent for processing. This is used to ensure collaborators wired to the `AbstractSecurityInterceptor` all support the indicated secure object class.

Specified by:
  `getSecureObjectClass` in class `AbstractSecurityInterceptor`
Returns:
  the type of secure object the subclass provides services for

### invoke

public Object invoke(org.aopalliance.intercept.MethodInvocation mi) throws Throwable
Deprecated.
This method should be used to enforce security on a `MethodInvocation`.

Specified by:
  `invoke` in interface `org.aopalliance.intercept.MethodInterceptor`
Parameters:
  `mi` - The method being invoked which requires a security decision
Returns:
  The returned value from the method invocation (possibly modified by the `AfterInvocationManager`).
Throws:
  `Throwable` - if any error occurs

### getSecurityMetadataSource

public MethodSecurityMetadataSource getSecurityMetadataSource()
Deprecated.

### obtainSecurityMetadataSource

public SecurityMetadataSource obtainSecurityMetadataSource()
Deprecated.

Specified by:
  `obtainSecurityMetadataSource` in class `AbstractSecurityInterceptor`

### setSecurityMetadataSource

public void setSecurityMetadataSource(MethodSecurityMetadataSource newSource)
Deprecated.