クラス AbstractLdapAuthenticationManagerFactory<T extends AbstractLdapAuthenticator>

java.lang.ObjectSE
org.springframework.security.config.ldap.AbstractLdapAuthenticationManagerFactory<T>
既知の直属サブクラス
LdapBindAuthenticationManagerFactoryLdapPasswordComparisonAuthenticationManagerFactory

public abstract class AbstractLdapAuthenticationManagerFactory<T extends AbstractLdapAuthenticator> extends ObjectSE
LDAP 認証を実行できる AuthenticationManager を作成します。
導入:
5.7
  • メソッドの詳細

    • setContextSource

      public void setContextSource(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource)
      LDAP 認証の実行に使用される BaseLdapPathContextSource を設定します。
      パラメーター:
      contextSource - LDAP 認証の実行に使用される BaseLdapPathContextSource 
    • getContextSource

      protected final org.springframework.ldap.core.support.BaseLdapPathContextSource getContextSource()
      LDAP 認証の実行に使用される BaseLdapPathContextSource を取得します。
      戻り値:
      LDAP 認証の実行に使用される BaseLdapPathContextSource 
    • setLdapAuthoritiesPopulator

      public void setLdapAuthoritiesPopulator(LdapAuthoritiesPopulator ldapAuthoritiesPopulator)
      LDAP ユーザーに付与された権限のリストを取得するために使用される LdapAuthoritiesPopulator を設定します。
      パラメーター:
      ldapAuthoritiesPopulator - 使用する LdapAuthoritiesPopulator
    • setAuthoritiesMapper

      public void setAuthoritiesMapper(GrantedAuthoritiesMapper authoritiesMapper)
      ストレージからロードされた権限を、UsernamePasswordAuthenticationToken に関連付けられる新しい権限のセットに変換するために使用される GrantedAuthoritiesMapper を設定します。
      パラメーター:
      authoritiesMapper - ユーザーの権限のマッピングに使用される GrantedAuthoritiesMapper
    • setUserDetailsContextMapper

      public void setUserDetailsContextMapper(UserDetailsContextMapper userDetailsContextMapper)
      Authentication にプリンシパルとして保存される UserDetails を作成するために使用されるカスタム戦略を設定します。
      パラメーター:
      userDetailsContextMapper - 戦略インスタンス
    • setUserDnPatterns

      public void setUserDnPatterns(StringSE... userDnPatterns)
      ユーザーがディレクトリ内の固定された場所にいる場合(つまり、ディレクトリ検索を行わずにユーザー名から直接 DN を計算できる場合)、この属性を使用して DN に直接マップできます。AbstractLdapAuthenticator の userDnPatterns プロパティに直接マップされます。この値は、"uid={0},ou=people" など、ユーザーの DN を構築するために使用される特定のパターンです。キー "{0}" が存在する必要があり、ユーザー名に置き換えられます。
      パラメーター:
      userDnPatterns - ユーザー名を見つけるための LDAP パターン
    • setUserSearchFilter

      public void setUserSearchFilter(StringSE userSearchFilter)
      ユーザーの検索に使用される LDAP フィルター(オプション)。たとえば、"(uid={0})" です。置換されるパラメーターは、ユーザーのログイン名です。
      パラメーター:
      userSearchFilter - ユーザーの検索に使用される LDAP フィルター
    • setUserSearchBase

      public void setUserSearchBase(StringSE userSearchBase)
      ユーザー検索の検索ベース。デフォルトは "" です。setUserSearchFilter(String) でのみ使用されます。
      パラメーター:
      userSearchBase - ユーザー検索の検索ベース
    • createAuthenticationManager

      public final AuthenticationManager createAuthenticationManager()
      LDAP 認証の実行に使用できる構成済みの AuthenticationManager を返します。
      戻り値:
      設定された AuthenticationManager
    • createDefaultLdapAuthenticator

      protected abstract T createDefaultLdapAuthenticator()
      サブクラスがデフォルトの AbstractLdapAuthenticator を提供できるようにします。
      戻り値:
      LDAP 認証用に構成される AbstractLdapAuthenticator