クラス AuthorizationManagerWebInvocationPrivilegeEvaluator
java.lang.ObjectSE
org.springframework.security.web.access.AuthorizationManagerWebInvocationPrivilegeEvaluator
- 実装済みのインターフェース一覧:
org.springframework.beans.factory.Aware, WebInvocationPrivilegeEvaluator, org.springframework.web.context.ServletContextAware
public final class AuthorizationManagerWebInvocationPrivilegeEvaluator
extends ObjectSE
implements WebInvocationPrivilegeEvaluator, org.springframework.web.context.ServletContextAware
チェックを
AuthorizationManager のインスタンスに委譲する WebInvocationPrivilegeEvaluator の実装 - 導入:
- 5.5.5
ネストされたクラスの概要
ネストされたクラスコンストラクター概要
コンストラクターコンストラクター説明AuthorizationManagerWebInvocationPrivilegeEvaluator(AuthorizationManager<jakarta.servlet.http.HttpServletRequest> authorizationManager) 方法の概要
修飾子と型メソッド説明booleanisAllowed(@Nullable StringSE contextPath, StringSE uri, @Nullable StringSE method, @Nullable Authentication authentication) 指定された Authentication オブジェクトによって表されるユーザーが、指定されたパラメーターを使用して指定された URI を呼び出すことができるかどうかを決定します。booleanisAllowed(StringSE uri, @Nullable Authentication authentication) 指定された Authentication オブジェクトによって表されるユーザーが、指定された URI を呼び出すことができるかどうかを決定します。voidsetRequestTransformer(AuthorizationManagerWebInvocationPrivilegeEvaluator.HttpServletRequestTransformer requestTransformer) voidsetServletContext(jakarta.servlet.ServletContext servletContext)
コンストラクターの詳細
AuthorizationManagerWebInvocationPrivilegeEvaluator
public AuthorizationManagerWebInvocationPrivilegeEvaluator(AuthorizationManager<jakarta.servlet.http.HttpServletRequest> authorizationManager)
方法の詳細
isAllowed
インターフェースからコピーされた説明:WebInvocationPrivilegeEvaluator指定された Authentication オブジェクトによって表されるユーザーが、指定された URI を呼び出すことができるかどうかを決定します。これは、特定の
HttpMethodを必要としない認可ルールにのみ一致することに注意してください。- 次で指定:
- インターフェース
WebInvocationPrivilegeEvaluator内のisAllowed - パラメーター:
uri- コンテキストパスを除く URI (デフォルトのコンテキストパス設定が使用されます)
isAllowed
public boolean isAllowed(@Nullable StringSE contextPath, StringSE uri, @Nullable StringSE method, @Nullable Authentication authentication) インターフェースからコピーされた説明:WebInvocationPrivilegeEvaluator指定された Authentication オブジェクトによって表されるユーザーが、指定されたパラメーターを使用して指定された URI を呼び出すことができるかどうかを決定します。注:
- FilterInvocationSecurityMetadataSource のデフォルト実装では、特定のリクエスト URI に適用されるセキュアオブジェクトメタデータを評価するときに
contextPathは無視されるため、カスタムFilterInvocationSecurityMetadataSourceを使用している場合を除き、通常、contextPathは重要ではありません。 - これは、特定の
HttpMethodを必要としない認可ルールにのみ一致します。
- 次で指定:
- インターフェース
WebInvocationPrivilegeEvaluator内のisAllowed - パラメーター:
contextPath- コンテキストパス(null の場合があります)。uri- コンテキストパスを除く URImethod- HTTP メソッド (または null、任意のメソッド)authentication- Authentication インスタンス。その権限は、アクセスを許可するかどうかの評価に使用する必要があります。- 戻り値:
- アクセスが許可されている場合は true、拒否されている場合は false
- FilterInvocationSecurityMetadataSource のデフォルト実装では、特定のリクエスト URI に適用されるセキュアオブジェクトメタデータを評価するときに
setServletContext
public void setServletContext(jakarta.servlet.ServletContext servletContext) - 次で指定:
- インターフェース
org.springframework.web.context.ServletContextAware内のsetServletContext
setRequestTransformer
public void setRequestTransformer(AuthorizationManagerWebInvocationPrivilegeEvaluator.HttpServletRequestTransformer requestTransformer) AuthorizationManagerに渡す前に使用するAuthorizationManagerWebInvocationPrivilegeEvaluator.HttpServletRequestTransformerを設定します。- パラメーター:
requestTransformer- 使用するAuthorizationManagerWebInvocationPrivilegeEvaluator.HttpServletRequestTransformer。