クラス DefaultHttpSecurityExpressionHandler
- java.lang.Object
-
- org.springframework.security.access.expression.AbstractSecurityExpressionHandler<RequestAuthorizationContext>
-
- org.springframework.security.web.access.expression.DefaultHttpSecurityExpressionHandler
- 実装されているすべてのインターフェース:
org.springframework.aop.framework.AopInfrastructureBean
、org.springframework.beans.factory.Aware
、org.springframework.context.ApplicationContextAware
、SecurityExpressionHandler<RequestAuthorizationContext>
public class DefaultHttpSecurityExpressionHandler extends AbstractSecurityExpressionHandler<RequestAuthorizationContext> implements SecurityExpressionHandler<RequestAuthorizationContext>
- 導入:
- 5.8
コンストラクターの概要
コンストラクター コンストラクター 説明 DefaultHttpSecurityExpressionHandler()
メソッドのサマリー
すべてのメソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 org.springframework.expression.EvaluationContext
createEvaluationContext(java.util.function.Supplier<Authentication> authentication, RequestAuthorizationContext context)
呼び出し型のセキュリティ式を評価するための評価コンテキストを提供します。protected SecurityExpressionOperations
createSecurityExpressionRoot(Authentication authentication, RequestAuthorizationContext context)
サポートされている呼び出し型に対して正しい型のルートオブジェクトを作成するために実装します。void
setDefaultRolePrefix(java.lang.String defaultRolePrefix)
SecurityExpressionRoot.hasAnyRole(String...)
またはSecurityExpressionRoot.hasRole(String)
に追加されるデフォルトのプレフィックスを設定します。void
setTrustResolver(AuthenticationTrustResolver trustResolver)
使用するAuthenticationTrustResolver
を設定します。クラス org.springframework.security.access.expression.AbstractSecurityExpressionHandler から継承されたメソッド
createEvaluationContext, createEvaluationContextInternal, getBeanResolver, getExpressionParser, getPermissionEvaluator, getRoleHierarchy, setApplicationContext, setExpressionParser, setPermissionEvaluator, setRoleHierarchy
クラス java.lang.Object から継承されたメソッド
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
インターフェース org.springframework.security.access.expression.SecurityExpressionHandler から継承されたメソッド
createEvaluationContext, getExpressionParser
メソッドの詳細
createEvaluationContext
public org.springframework.expression.EvaluationContext createEvaluationContext(java.util.function.Supplier<Authentication> authentication, RequestAuthorizationContext context)
インターフェースからコピーされた説明:SecurityExpressionHandler
呼び出し型のセキュリティ式を評価するための評価コンテキストを提供します。Authentication
オブジェクトの遅延初期化を使用するカスタム実装を提供するために、このメソッドをオーバーライドできます。デフォルトでは、このメソッドはAuthentication
オブジェクトの先行初期化を使用します。- 次で指定:
- インターフェース
SecurityExpressionHandler<RequestAuthorizationContext>
のcreateEvaluationContext
- パラメーター:
authentication
- 使用するAuthentication
のSupplier
context
- 使用するSecurityExpressionHandler
- 戻り値:
- 使用する
EvaluationContext
createSecurityExpressionRoot
protected SecurityExpressionOperations createSecurityExpressionRoot(Authentication authentication, RequestAuthorizationContext context)
クラスからコピーされた説明:AbstractSecurityExpressionHandler
サポートされている呼び出し型に対して正しい型のルートオブジェクトを作成するために実装します。- 次で指定:
- クラス
AbstractSecurityExpressionHandler<RequestAuthorizationContext>
のcreateSecurityExpressionRoot
- パラメーター:
authentication
- 現在の認証オブジェクトcontext
- 呼び出し (フィルター、メソッド、チャネル)- 戻り値:
- オブジェクト
setTrustResolver
public void setTrustResolver(AuthenticationTrustResolver trustResolver)
使用するAuthenticationTrustResolver
を設定します。デフォルトはAuthenticationTrustResolverImpl
です。- パラメーター:
trustResolver
- 使用するAuthenticationTrustResolver
setDefaultRolePrefix
public void setDefaultRolePrefix(java.lang.String defaultRolePrefix)
SecurityExpressionRoot.hasAnyRole(String...)
またはSecurityExpressionRoot.hasRole(String)
に追加するデフォルトのプレフィックスを設定します。例: hasRole("ADMIN" ) または hasRole("ROLE_ADMIN" ) が渡された場合、defaultRolePrefix が "ROLE_" (デフォルト) のときはロール ROLE_ADMIN が使用されます。- パラメーター:
defaultRolePrefix
- ロールに追加するデフォルトのプレフィックス。デフォルトは "ROLE_" です。