クラス EmbeddedLdapServerContextSourceFactoryBean

  • 実装されたすべてのインターフェース:
    org.springframework.beans.factory.Awareorg.springframework.beans.factory.DisposableBeanorg.springframework.beans.factory.FactoryBean<DefaultSpringSecurityContextSource>org.springframework.context.ApplicationContextAware

    public class EmbeddedLdapServerContextSourceFactoryBean
    extends java.lang.Object
    implements org.springframework.beans.factory.FactoryBean<DefaultSpringSecurityContextSource>, org.springframework.beans.factory.DisposableBean, org.springframework.context.ApplicationContextAware
    LDAP 認証を実行するために使用される DefaultSpringSecurityContextSource を作成し、メモリ内の LDAP サーバーを起動します。
    導入:
    5.7
    • フィールドサマリー

      • インターフェース org.springframework.beans.factory.FactoryBean から継承されたフィールド

        OBJECT_TYPE_ATTRIBUTE
    • メソッドのサマリー

      すべてのメソッド   静的メソッド   インスタンスメソッド   具象メソッド  
      修飾子と型 メソッド 説明
      voiddestroy()
      static EmbeddedLdapServerContextSourceFactoryBeanfromEmbeddedLdapServer()
      組み込み LDAP サーバーを使用して LDAP 認証を実行する EmbeddedLdapServerContextSourceFactoryBean を作成します。
      DefaultSpringSecurityContextSourcegetObject()
      java.lang.Class<?>getObjectType()
      voidsetApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
      voidsetLdif​(java.lang.String ldif)
      組み込み LDAP サーバーの起動時にロードする LDIF を指定します。
      voidsetManagerDn​(java.lang.String managerDn)
      「マネージャー」ユーザー ID のユーザー名(DN)(つまり
      voidsetManagerPassword​(java.lang.String managerPassword)
      マネージャー DN のパスワード。
      voidsetPort​(int port)
      LDAP に接続するポート(デフォルトは 33389、または使用できない場合はランダムに使用可能なポート)。
      voidsetRoot​(java.lang.String root)
      組み込み LDAP サーバーのオプションのルートサフィックス。
      • クラス java.lang.Object から継承されたメソッド

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
      • インターフェース org.springframework.beans.factory.FactoryBean から継承されたメソッド

        isSingleton
    • コンストラクターの詳細

      • EmbeddedLdapServerContextSourceFactoryBean

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

      • fromEmbeddedLdapServer

        public static EmbeddedLdapServerContextSourceFactoryBean fromEmbeddedLdapServer()
        組み込み LDAP サーバーを使用して LDAP 認証を実行する EmbeddedLdapServerContextSourceFactoryBean を作成します。これには、`com.unboundid:unboundid-ldapsdk` への依存が必要です。
        戻り値:
        EmbeddedLdapServerContextSourceFactoryBean
      • setLdif

        public void setLdif​(java.lang.String ldif)
        組み込み LDAP サーバーの起動時にロードする LDIF を指定します。デフォルトは "classpath*:*.ldif" です。
        パラメーター:
        ldif - 組み込み LDAP サーバーの起動時にロードする ldif。
      • setPort

        public void setPort​(int port)
        LDAP に接続するポート(デフォルトは 33389、または使用できない場合はランダムに使用可能なポート)。ポートとして 0 を指定すると、使用可能なランダムなポートを選択する必要があることを示します。
        パラメーター:
        port - 接続するポート
      • setRoot

        public void setRoot​(java.lang.String root)
        組み込み LDAP サーバーのオプションのルートサフィックス。デフォルトは "dc=springframework,dc=org" です。
        パラメーター:
        root - 組み込み LDAP サーバーのルートサフィックス
      • setManagerDn

        public void setManagerDn​(java.lang.String managerDn)
        LDAP サーバーへの認証に使用される「マネージャー」ユーザー ID("uid=admin,ou=system" など)のユーザー名(DN)。省略した場合、匿名アクセスが使用されます。
        パラメーター:
        managerDn - LDAP サーバーへの認証に使用される「マネージャー」ユーザー ID のユーザー名(DN)。
      • setManagerPassword

        public void setManagerPassword​(java.lang.String managerPassword)
        マネージャー DN のパスワード。これは、setManagerDn(String) が指定されている場合に必要です。
        パラメーター:
        managerPassword - マネージャー DN のパスワード
      • getObjectType

        public java.lang.Class<?> getObjectType()
        次で指定:
        インターフェース org.springframework.beans.factory.FactoryBean<DefaultSpringSecurityContextSource>getObjectType 
      • destroy

        public void destroy()
        次で指定:
        インターフェース org.springframework.beans.factory.DisposableBeandestroy 
      • setApplicationContext

        public void setApplicationContext​(org.springframework.context.ApplicationContext applicationContext)
                                   throws org.springframework.beans.BeansException
        次で指定:
        インターフェース org.springframework.context.ApplicationContextAwaresetApplicationContext 
        例外:
        org.springframework.beans.BeansException