Class NativeAuthenticationHelper


  • @Deprecated(since="2021-05-27")
    public final class NativeAuthenticationHelper
    extends Object
    Deprecated.
    Usage of this API is not supported in AEM as a Cloud Service.
    Utility class for working with MongoDB native authentication.

    This class should not be considered a part of the public API.

    • Method Detail

      • createAuthenticationHash

        public static String createAuthenticationHash​(String userName,
                                                      char[] password)
        Deprecated.
        Creates a hash of the given user name and password, which is the hex encoding of MD5( <userName> + ":mongo:" + <password> ).
        Parameters:
        userName - the user name
        password - the password
        Returns:
        the hash as a string
      • getAuthCommand

        public static BsonDocument getAuthCommand​(String userName,
                                                  char[] password,
                                                  String nonce)
        Deprecated.
      • getNonceCommand

        public static BsonDocument getNonceCommand()
        Deprecated.