クラス PasswordComparisonAuthenticator
java.lang.ObjectSE
org.springframework.security.ldap.authentication.AbstractLdapAuthenticator
org.springframework.security.ldap.authentication.PasswordComparisonAuthenticator
- 実装済みのインターフェース一覧:
org.springframework.beans.factory.Aware, org.springframework.beans.factory.InitializingBean, org.springframework.context.MessageSourceAware, LdapAuthenticator
ログインパスワードを、リモート LDAP の「比較」操作を使用してディレクトリに格納されている値と比較する
LdapAuthenticator。 パスワードがダイジェスト形式でリポジトリに格納されている場合は、適切な PasswordEncoder 実装を提供する必要があります。デフォルトでは、パスワードは LdapShaPasswordEncoder を使用してエンコードされます。salted-SHA(SSHA)パスワードが使用されている場合、比較操作は機能しません。これは、ディレクトリによって生成されるランダムなバイトシーケンスである salt 値を知ることができないためです。
フィールド概要
クラス AbstractLdapAuthenticator から継承されたフィールド
messagesコンストラクター概要
コンストラクターコンストラクター説明PasswordComparisonAuthenticator(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource) 使用すべきではありません。PasswordComparisonAuthenticator(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource, PasswordEncoder passwordEncoder) 方法の概要
修飾子と型メソッド説明org.springframework.ldap.core.DirContextOperationsauthenticate(Authentication authentication) ユーザーとして認証し、ディレクトリから追加のユーザー情報を取得します。voidsetPasswordAttributeName(StringSE passwordAttribute) voidsetPasswordEncoder(PasswordEncoder passwordEncoder) voidsetUsePasswordAttrCompare(boolean usePasswordAttrCompare)
コンストラクターの詳細
PasswordComparisonAuthenticator
@DeprecatedSE(since="7.1") public PasswordComparisonAuthenticator(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource) 使用すべきではありません。PasswordComparisonAuthenticator
public PasswordComparisonAuthenticator(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource, PasswordEncoder passwordEncoder)
方法の詳細
authenticate
public org.springframework.ldap.core.DirContextOperations authenticate(Authentication authentication) インターフェースからコピーされた説明:LdapAuthenticatorユーザーとして認証し、ディレクトリから追加のユーザー情報を取得します。- パラメーター:
authentication- 認証リクエスト- 戻り値:
- 正常に認証されたユーザーの詳細。
setPasswordAttributeName
setUsePasswordAttrCompare
public void setUsePasswordAttrCompare(boolean usePasswordAttrCompare) setPasswordEncoder
PasswordComparisonAuthenticator(BaseLdapPathContextSource, PasswordEncoder)を使用してください