クラス ConsensusBased
java.lang.ObjectSE
org.springframework.security.access.vote.AbstractAccessDecisionManager
org.springframework.security.access.vote.ConsensusBased
- 実装されているすべてのインターフェース:
org.springframework.beans.factory.Aware、org.springframework.beans.factory.InitializingBean、org.springframework.context.MessageSourceAware、AccessDecisionManager
使用すべきではありません。
コンセンサスベースのアプローチを使用する
AccessDecisionManager のシンプルで具体的な実装。 ここでの「コンセンサス」とは、全会一致(棄権を無視)ではなく、多数決(棄権を無視)を意味します。全会一致が必要な場合は、UnanimousBased を参照してください。
フィールドのサマリー
クラス org.springframework.security.access.vote.AbstractAccessDecisionManager から継承されたフィールド
logger, messagesコンストラクターの概要
コンストラクターメソッドのサマリー
修飾子と型メソッド説明voiddecide(Authentication authentication, ObjectSE object, CollectionSE<ConfigAttribute> configAttributes) 使用すべきではありません。この具体的な実装は、構成されたすべてのAccessDecisionVoterをポーリングするだけで、完了時に、拒否されたレスポンスに対して許可されたコンセンサスを決定します。boolean使用すべきではありません。voidsetAllowIfEqualGrantedDeniedDecisions(boolean allowIfEqualGrantedDeniedDecisions) 使用すべきではありません。クラス org.springframework.security.access.vote.AbstractAccessDecisionManager から継承されたメソッド
afterPropertiesSet, checkAllowIfAllAbstainDecisions, getDecisionVoters, isAllowIfAllAbstainDecisions, setAllowIfAllAbstainDecisions, setMessageSource, supports, supports, toString
コンストラクターの詳細
ConsensusBased
使用すべきではありません。
メソッドの詳細
decide
public void decide(Authentication authentication, ObjectSE object, CollectionSE<ConfigAttribute> configAttributes) throws AccessDeniedException 使用すべきではありません。この具体的な実装は、構成されたすべてのAccessDecisionVoterをポーリングするだけで、完了時に、拒否されたレスポンスに対して許可されたコンセンサスを決定します。賛成票と拒否票の数が等しい場合、決定は
isAllowIfEqualGrantedDeniedDecisions()プロパティに基づいて行われます(デフォルトは true)。すべての
AccessDecisionVoterが投票を棄権した場合、決定はAbstractAccessDecisionManager.isAllowIfAllAbstainDecisions()プロパティに基づいて行われます(デフォルトは false)。- パラメーター:
authentication- メソッドを呼び出す呼び出し元object- 保護されたオブジェクトconfigAttributes- 呼び出されるメソッドに関連付けられた構成属性- 例外:
AccessDeniedException- アクセスが拒否された場合
isAllowIfEqualGrantedDeniedDecisions
public boolean isAllowIfEqualGrantedDeniedDecisions()使用すべきではありません。setAllowIfEqualGrantedDeniedDecisions
public void setAllowIfEqualGrantedDeniedDecisions(boolean allowIfEqualGrantedDeniedDecisions) 使用すべきではありません。
AuthorizationManagerを使用してください