クラス EmbeddedLdapServerContextSourceFactoryBean
- java.lang.Object
-
- org.springframework.security.config.ldap.EmbeddedLdapServerContextSourceFactoryBean
- 実装済みのインターフェース一覧:
org.springframework.beans.factory.Aware、org.springframework.beans.factory.DisposableBean、org.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
コンストラクター概要
コンストラクター コンストラクター 説明 EmbeddedLdapServerContextSourceFactoryBean()
方法の概要
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 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 サーバーのオプションのルートサフィックス。
メソッドの詳細
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 のパスワード
getObject
public DefaultSpringSecurityContextSource getObject() throws java.lang.Exception
- 次で指定:
- インターフェース
org.springframework.beans.factory.FactoryBean<DefaultSpringSecurityContextSource>内のgetObject - 例外:
java.lang.Exception
getObjectType
public java.lang.Class<?> getObjectType()
- 次で指定:
- インターフェース
org.springframework.beans.factory.FactoryBean<DefaultSpringSecurityContextSource>内のgetObjectType
destroy
public void destroy()
- 次で指定:
- インターフェース
org.springframework.beans.factory.DisposableBean内のdestroy
setApplicationContext
public void setApplicationContext(org.springframework.context.ApplicationContext applicationContext) throws org.springframework.beans.BeansException- 次で指定:
- インターフェース
org.springframework.context.ApplicationContextAware内のsetApplicationContext - 例外:
org.springframework.beans.BeansException