クラス 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()
メソッドのサマリー
すべてのメソッド 静的メソッド インスタンスメソッド 具象メソッド 修飾子と型 メソッド 説明 void
destroy()
static EmbeddedLdapServerContextSourceFactoryBean
fromEmbeddedLdapServer()
組み込み LDAP サーバーを使用して LDAP 認証を実行する EmbeddedLdapServerContextSourceFactoryBean を作成します。DefaultSpringSecurityContextSource
getObject()
java.lang.Class<?>
getObjectType()
void
setApplicationContext(org.springframework.context.ApplicationContext applicationContext)
void
setLdif(java.lang.String ldif)
組み込み LDAP サーバーの起動時にロードする LDIF を指定します。void
setManagerDn(java.lang.String managerDn)
「マネージャー」ユーザー ID のユーザー名(DN)(つまりvoid
setManagerPassword(java.lang.String managerPassword)
マネージャー DN のパスワード。void
setPort(int port)
LDAP に接続するポート(デフォルトは 33389、または使用できない場合はランダムに使用可能なポート)。void
setRoot(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