クラス PrePostAnnotationSecurityMetadataSource
- java.lang.Object
-
- org.springframework.security.access.method.AbstractMethodSecurityMetadataSource
-
- org.springframework.security.access.prepost.PrePostAnnotationSecurityMetadataSource
- 実装されたすべてのインターフェース:
org.springframework.aop.framework.AopInfrastructureBean
、MethodSecurityMetadataSource
、SecurityMetadataSource
@Deprecated public class PrePostAnnotationSecurityMetadataSource extends AbstractMethodSecurityMetadataSource
使用すべきではありません。代わりにPreAuthorizeAuthorizationManager
とPostAuthorizeAuthorizationManager
を使用してくださいMethodSecurityMetadataSource は、メソッドに配置された @PreFilter および @PreAuthorize アノテーションからメタデータを抽出します。このクラスは、関連するアノテーション(存在する場合)を見つけることだけを担当します。実際の ConfigAttribute の作成をPrePostInvocationAttributeFactory
に委譲するため、アノテーションの動作を強制するメカニズムから切り離されます。クラスまたはメソッドにアノテーションを指定することもできますが、メソッド固有のアノテーションが優先されます。アノテーションを使用し、事前認可条件を指定しない場合は、@PreAuthorize("permitAll" ) が存在するかのようにメソッドが認可されます。
ここでは複数のアノテーションを処理しているため、1 つのメソッドに対して複数の場所で定義されたアノテーションを組み合わせる必要がある場合があります。これらはメソッド自体で定義されているか、インターフェースまたはクラスレベルで定義されている可能性があります。
- 導入:
- 3.0
- 関連事項:
PreInvocationAuthorizationAdviceVoter
フィールドのサマリー
クラス org.springframework.security.access.method.AbstractMethodSecurityMetadataSource から継承されたフィールド
logger
コンストラクターの概要
コンストラクター コンストラクター 説明 PrePostAnnotationSecurityMetadataSource(PrePostInvocationAttributeFactory attributeFactory)
使用すべきではありません。
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 非推奨のメソッド 修飾子と型 メソッド 説明 java.util.Collection<ConfigAttribute>
getAllConfigAttributes()
使用すべきではありません。使用可能な場合、実装クラスによって定義されたすべてのConfigAttribute
を返します。java.util.Collection<ConfigAttribute>
getAttributes(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
使用すべきではありません。クラス org.springframework.security.access.method.AbstractMethodSecurityMetadataSource から継承されたメソッド
getAttributes, supports
コンストラクターの詳細
PrePostAnnotationSecurityMetadataSource
public PrePostAnnotationSecurityMetadataSource(PrePostInvocationAttributeFactory attributeFactory)
使用すべきではありません。
メソッドの詳細
getAttributes
public java.util.Collection<ConfigAttribute> getAttributes(java.lang.reflect.Method method, java.lang.Class<?> targetClass)
使用すべきではありません。
getAllConfigAttributes
public java.util.Collection<ConfigAttribute> getAllConfigAttributes()
使用すべきではありません。インターフェースからコピーされた説明:SecurityMetadataSource
使用可能な場合、実装クラスによって定義されたすべてのConfigAttribute
を返します。これは、
AbstractSecurityInterceptor
に対して構成されている各ConfigAttribute
の起動時検証を実行するために使用されます。- 戻り値:
- サポートされていない場合は
ConfigAttribute
またはnull