クラス 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 Attributes2GrantedAuthoritiesMapper
protected final org.apache.commons.logging.Log
コンストラクターのサマリー
コンストラクターメソッドのサマリー
修飾子と型メソッド説明void
必要なプロパティがすべて設定されていることを確認します。buildDetails
(jakarta.servlet.http.HttpServletRequest context) 認証詳細オブジェクトを作成します。protected CollectionSE<StringSE>
getUserRoles
(jakarta.servlet.http.HttpServletRequest request) 現在のユーザーの JEE ロールに基づいてユーザーロールのリストを取得します。void
setMappableRolesRetriever
(MappableAttributesRetriever aJ2eeMappableRolesRetriever) void
フィールドの詳細
logger
protected final org.apache.commons.logging.Log loggerj2eeMappableRoles
構成されたMappableAttributesRetriever
によって返されるロール属性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