クラス J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource
java.lang.ObjectSE
org.springframework.security.web.authentication.preauth.j2ee.J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource
- 実装済みのインターフェース一覧:
org.springframework.beans.factory.InitializingBean, AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest, PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails>
public class J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource
extends ObjectSE
implements AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest, PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails>, org.springframework.beans.factory.InitializingBean
ユーザーの J2EE ロール(
HttpServletRequest.isUserInRole(String) を呼び出して取得したもの)を GrantedAuthority に変換し、認証詳細オブジェクトに格納する AuthenticationDetailsSource の実装。- 導入:
- 2.0
フィールド概要
フィールド修飾子と型フィールド説明構成されたMappableAttributesRetrieverによって返されるロール属性protected Attributes2GrantedAuthoritiesMapperprotected final org.apache.commons.logging.Logコンストラクター概要
コンストラクター方法の概要
修飾子と型メソッド説明void必要なプロパティがすべて設定されていることを確認します。buildDetails(jakarta.servlet.http.HttpServletRequest context) 認証詳細オブジェクトを作成します。protected CollectionSE<StringSE> getUserRoles(jakarta.servlet.http.HttpServletRequest request) 現在のユーザーの JEE ロールに基づいてユーザーロールのリストを取得します。voidsetMappableRolesRetriever(MappableAttributesRetriever aJ2eeMappableRolesRetriever) void
フィールドの詳細
logger
protected final org.apache.commons.logging.Log loggerj2eeMappableRoles
j2eeUserRoles2GrantedAuthoritiesMapper
コンストラクターの詳細
J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource
public J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource()
方法の詳細
afterPropertiesSet
public void afterPropertiesSet()必要なプロパティがすべて設定されていることを確認します。- 次で指定:
- インターフェース
org.springframework.beans.factory.InitializingBean内のafterPropertiesSet
getUserRoles
現在のユーザーの JEE ロールに基づいてユーザーロールのリストを取得します。HttpServletRequest.isUserInRole(String)メソッドは、j2eeMappableRolesセットの各値に対して呼び出され、そのロールをユーザーに割り当てる必要があるかどうかを決定します。- パラメーター:
request- ユーザーのロールを抽出するために使用するリクエスト。- 戻り値:
- リクエストを行っている現在のユーザーに適用される
j2eeMappableRolesのサブセット。
buildDetails
public PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails buildDetails(jakarta.servlet.http.HttpServletRequest context) 認証詳細オブジェクトを作成します。- 次で指定:
- インターフェース
AuthenticationDetailsSource<jakarta.servlet.http.HttpServletRequest, PreAuthenticatedGrantedAuthoritiesWebAuthenticationDetails>内のbuildDetails - パラメーター:
context- 認証詳細オブジェクトによって使用されるリクエストオブジェクト- 戻り値:
- 完全に構成された認証詳細インスタンス
- 関連事項:
setMappableRolesRetriever
- パラメーター:
aJ2eeMappableRolesRetriever- 使用する MappableAttributesRetriever
setUserRoles2GrantedAuthoritiesMapper
- パラメーター:
mapper- 使用する Attributes2GrantedAuthoritiesMapper