クラス J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource

java.lang.ObjectSE
org.springframework.security.web.authentication.preauth.j2ee.J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource
実装されたすべてのインターフェース:
org.springframework.beans.factory.InitializingBeanAuthenticationDetailsSource<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
  • フィールドの詳細

    • logger

      protected final org.apache.commons.logging.Log logger
    • j2eeMappableRoles

      protected SetSE<StringSE> j2eeMappableRoles
      構成された MappableAttributesRetriever によって返されるロール属性
    • j2eeUserRoles2GrantedAuthoritiesMapper

      protected Attributes2GrantedAuthoritiesMapper j2eeUserRoles2GrantedAuthoritiesMapper
  • コンストラクターの詳細

    • J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource

      public J2eeBasedPreAuthenticatedWebAuthenticationDetailsSource()
  • メソッドの詳細

    • afterPropertiesSet

      public void afterPropertiesSet()
      必要なプロパティがすべて設定されていることを確認します。
      次で指定:
      インターフェース org.springframework.beans.factory.InitializingBeanafterPropertiesSet 
    • getUserRoles

      protected CollectionSE<StringSE> getUserRoles(jakarta.servlet.http.HttpServletRequest request)
      現在のユーザーの 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

      public void setMappableRolesRetriever(MappableAttributesRetriever aJ2eeMappableRolesRetriever)
      パラメーター:
      aJ2eeMappableRolesRetriever - 使用する MappableAttributesRetriever
    • setUserRoles2GrantedAuthoritiesMapper

      public void setUserRoles2GrantedAuthoritiesMapper(Attributes2GrantedAuthoritiesMapper mapper)
      パラメーター:
      mapper - 使用する Attributes2GrantedAuthoritiesMapper