lib/omniauth-ldap/adaptor.rb in gitlab_omniauth-ldap-2.0.1 vs lib/omniauth-ldap/adaptor.rb in gitlab_omniauth-ldap-2.0.2

- old
+ new

@@ -67,10 +67,11 @@ config = { base: @base, hosts: @hosts, host: @host, port: @port, + encryption: encryption_options } @bind_method = @try_sasl ? :sasl : (@allow_anonymous||!@bind_dn||!@password ? :anonymous : :simple) @auth = sasl_auths({:username => @bind_dn, :password => @password}).first if @bind_method == :sasl @@ -78,11 +79,10 @@ :username => @bind_dn, :password => @password } config[:auth] = @auth @connection = Net::LDAP.new(config) - @connection.encryption(encryption_options) end #:base => "dc=yourcompany, dc=com", # :filter => "(mail=#{user})", # :password => psw @@ -107,9 +107,10 @@ private def encryption_options translated_method = translate_method + return nil unless translated_method { method: translated_method, tls_options: tls_options(translated_method) }