Package com.mongodb

Enum AuthenticationMechanism

    • Enum Constant Detail

      • MONGODB_X509

        public static final AuthenticationMechanism MONGODB_X509
        The MongoDB X.509 mechanism. This mechanism is available only with client certificates over SSL.
      • MONGODB_CR

        public static final AuthenticationMechanism MONGODB_CR
        Deprecated.
        This mechanism was replaced by SCRAM_SHA_1 in MongoDB 3.0, and is now deprecated
        The MongoDB Challenge Response mechanism.
      • SCRAM_SHA_256

        public static final AuthenticationMechanism SCRAM_SHA_256
        The SCRAM-SHA-256 mechanism. See the .
        Since:
        3.8
    • Method Detail

      • values

        public static AuthenticationMechanism[] values()
        Returns an array containing the constants of this enum type, in the order they are declared. This method may be used to iterate over the constants as follows:
        for (AuthenticationMechanism c : AuthenticationMechanism.values())
            System.out.println(c);
        
        Returns:
        an array containing the constants of this enum type, in the order they are declared
      • valueOf

        public static  name)
        Returns the enum constant of this type with the specified name. The string must match exactly an identifier used to declare an enum constant in this type. (Extraneous whitespace characters are not permitted.)
        Parameters:
        name - the name of the enum constant to be returned.
        Returns:
        the enum constant with the specified name
        Throws:
        - if this enum type has no constant with the specified name
        - if the argument is null
      • getMechanismName

        public  getMechanismName()
        Get the mechanism name.
        Returns:
        the mechanism name
      • fromMechanismName

        public static  mechanismName)
        Gets the mechanism by its name.
        Parameters:
        mechanismName - the mechanism name
        Returns:
        the mechanism
        See Also:
        getMechanismName()