クラス PasswordComparisonAuthenticator

  • 実装されたすべてのインターフェース:
    org.springframework.beans.factory.Awareorg.springframework.beans.factory.InitializingBeanorg.springframework.context.MessageSourceAwareLdapAuthenticator

    public final class PasswordComparisonAuthenticator
    extends AbstractLdapAuthenticator
    ログインパスワードを、リモート LDAP の「比較」操作を使用してディレクトリに格納されている値と比較する LdapAuthenticator

    パスワードがダイジェスト形式でリポジトリに格納されている場合は、適切な PasswordEncoder 実装を提供する必要があります。デフォルトでは、パスワードは LdapShaPasswordEncoder を使用してエンコードされます。salted-SHA(SSHA)パスワードが使用されている場合、比較操作は機能しません。これは、ディレクトリによって生成されるランダムなバイトシーケンスである salt 値を知ることができないためです。

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

      • PasswordComparisonAuthenticator

        public PasswordComparisonAuthenticator​(org.springframework.ldap.core.support.BaseLdapPathContextSource contextSource)
    • メソッドの詳細

      • authenticate

        public org.springframework.ldap.core.DirContextOperations authenticate​(Authentication authentication)
        インターフェースからコピーされた説明: LdapAuthenticator
        ユーザーとして認証し、ディレクトリから追加のユーザー情報を取得します。
        戻り値:
        正常に認証されたユーザーの詳細。
      • setPasswordAttributeName

        public void setPasswordAttributeName​(java.lang.String passwordAttribute)
      • setUsePasswordAttrCompare

        public void setUsePasswordAttrCompare​(boolean usePasswordAttrCompare)
      • setPasswordEncoder

        public void setPasswordEncoder​(PasswordEncoder passwordEncoder)