public void setAuthenticationMechanism(String authenticationMechanism) {
        setEnvironmentProperty(Context.SECURITY_AUTHENTICATION, authenticationMechanism);
    }
Sets the type of LDAP authentication mechanism to use when connecting to the LDAP server.
This is a wrapper method for setting the JNDI {@link #getEnvironment() environment template}'s
{@link Context#SECURITY_AUTHENTICATION} property.
<p/>
"none" (i.e. anonymous) and "simple" authentications are supported automatically and don't need to be configured
via this property.  However, if you require a different mechanism, such as a SASL or External mechanism, you
must configure that explicitly via this property.  See the
<a href="http://download-llnw.oracle.com/javase/tutorial/jndi/ldap/auth_mechs.html">JNDI LDAP
Authentication Mechanisms</a> for more information.

@param authenticationMechanism the type of LDAP authentication to perform.
@see <a href="http://download-llnw.oracle.com/javase/tutorial/jndi/ldap/auth_mechs.html">
http://download-llnw.oracle.com/javase/tutorial/jndi/ldap/auth_mechs.html</a>
core/src/main/java/org/apache/shiro/realm/ldap/JndiLdapContextFactory.java