public class PrePostAnnotationSecurityMetadataSource extends AbstractMethodSecurityMetadataSource
PrePostInvocationAttributeFactory, thus decoupling itself from
the mechanism which will enforce the annotations' behaviour.
Annotations may be specified on classes or methods, and method-specific annotations will take precedence. If you use any annotation and do not specify a pre-authorization condition, then the method will be allowed as if a @PreAuthorize("permitAll") were present.
Since we are handling multiple annotations here, it's possible that we may have to combine annotations defined in multiple locations for a single method - they may be defined on the method itself, or at interface or class level.
PreInvocationAuthorizationAdviceVoterlogger| Constructor and Description |
|---|
PrePostAnnotationSecurityMetadataSource(PrePostInvocationAttributeFactory attributeFactory) |
| Modifier and Type | Method and Description |
|---|---|
java.util.Collection<ConfigAttribute> |
getAllConfigAttributes()
If available, returns all of the
ConfigAttributes defined by the
implementing class. |
java.util.Collection<ConfigAttribute> |
getAttributes(java.lang.reflect.Method method,
java.lang.Class<?> targetClass) |
getAttributes, supportspublic PrePostAnnotationSecurityMetadataSource(PrePostInvocationAttributeFactory attributeFactory)
public java.util.Collection<ConfigAttribute> getAttributes(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
public java.util.Collection<ConfigAttribute> getAllConfigAttributes()
SecurityMetadataSourceConfigAttributes defined by the
implementing class.
This is used by the AbstractSecurityInterceptor to perform startup time
validation of each ConfigAttribute configured against it.
ConfigAttributes or null if unsupported