クラス DefaultWebInvocationPrivilegeEvaluator
- java.lang.Object
-
- org.springframework.security.web.access.DefaultWebInvocationPrivilegeEvaluator
- 実装されているすべてのインターフェース:
org.springframework.beans.factory.Aware
、WebInvocationPrivilegeEvaluator
、org.springframework.web.context.ServletContextAware
public class DefaultWebInvocationPrivilegeEvaluator extends java.lang.Object implements WebInvocationPrivilegeEvaluator, org.springframework.web.context.ServletContextAware
ユーザーが特定の Web URI に対する特権を持っているかどうかを判断できるようにします。- 導入:
- 3.0
フィールドのサマリー
フィールド 修飾子と型 フィールド 説明 protected static org.apache.commons.logging.Log
logger
コンストラクターの概要
コンストラクター コンストラクター 説明 DefaultWebInvocationPrivilegeEvaluator(AbstractSecurityInterceptor securityInterceptor)
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 boolean
isAllowed(java.lang.String contextPath, java.lang.String uri, java.lang.String method, Authentication authentication)
指定された Authentication オブジェクトで表されるユーザーが、指定されたを使用して、指定された URI を呼び出すことができるかどうかを決定します。boolean
isAllowed(java.lang.String uri, Authentication authentication)
指定された Authentication オブジェクトによって表されるユーザーが、指定された URI を呼び出すことができるかどうかを決定します。void
setServletContext(javax.servlet.ServletContext servletContext)
コンストラクターの詳細
DefaultWebInvocationPrivilegeEvaluator
public DefaultWebInvocationPrivilegeEvaluator(AbstractSecurityInterceptor securityInterceptor)
メソッドの詳細
isAllowed
public boolean isAllowed(java.lang.String uri, Authentication authentication)
指定された Authentication オブジェクトによって表されるユーザーが、指定された URI を呼び出すことができるかどうかを決定します。- 次で指定:
- インターフェース
WebInvocationPrivilegeEvaluator
のisAllowed
- パラメーター:
uri
- コンテキストパスを除く URI (デフォルトのコンテキストパス設定が使用されます)
isAllowed
public boolean isAllowed(java.lang.String contextPath, java.lang.String uri, java.lang.String method, Authentication authentication)
指定された Authentication オブジェクトで表されるユーザーが、指定されたを使用して、指定された URI を呼び出すことができるかどうかを決定します。FilterInvocationSecurityMetadataSource のデフォルトの実装では、どのセキュアオブジェクトメタデータが特定のリクエスト URI に適用されるかを評価するときに
contextPath
を無視するため、カスタムFilterInvocationSecurityMetadataSource
を使用している場合を除き、通常、contextPath
は重要ではありません。- 次で指定:
- インターフェース
WebInvocationPrivilegeEvaluator
のisAllowed
- パラメーター:
uri
- コンテキストパスを除く URIcontextPath
- コンテキストパス(null の場合があります。その場合、デフォルト値が使用されます)。method
- HTTP メソッド (または null、任意のメソッド)authentication
- Authentication インスタンス。その権限は、アクセスを許可するかどうかの評価に使用する必要があります。- 戻り値:
- アクセスが許可されている場合は true、拒否されている場合は false
setServletContext
public void setServletContext(javax.servlet.ServletContext servletContext)
- 次で指定:
- インターフェース
org.springframework.web.context.ServletContextAware
のsetServletContext