Add dotenv
This commit is contained in:
@@ -24,9 +24,9 @@ class LdapUsersController < ApplicationController
|
||||
private
|
||||
|
||||
def ldap_client
|
||||
ldap_client ||= Net::LDAP.new host: "ldap.kosmos.org",
|
||||
port: 636,
|
||||
encryption: :simple_tls,
|
||||
ldap_client ||= Net::LDAP.new host: ENV['LDAP_HOST'],
|
||||
port: ENV['LDAP_PORT'],
|
||||
encryption: ENV['LDAP_USE_TLS'] ? :simple_tls : nil,
|
||||
auth: {
|
||||
method: :simple,
|
||||
username: Rails.application.credentials.ldap[:username],
|
||||
|
||||
Reference in New Issue
Block a user