This repository has been archived on 2024-03-16. You can view files and clone it, but cannot push or open issues or pull requests.
orbit-4-1/config/initializers/nccu_ldap_connection.rb

16 lines
420 B
Ruby

#encoding: utf-8
require 'mysql2'
$nccu_ldap_connection
module NccuLdapConnection
BASE = 'ou=People,dc=nccu,dc=edu,dc=tw'
def self.establish
$nccu_ldap_connection = Net::LDAP.new
$nccu_ldap_connection.port =LDAP_CONFIG["port"]
$nccu_ldap_connection.host = LDAP_CONFIG["host"]
$nccu_ldap_connection.authenticate(LDAP_CONFIG["authenticate_info"],LDAP_CONFIG["authenticate_pwd"])
end
end