ldap config for 0229 nccu demo
This commit is contained in:
		
							parent
							
								
									3209f9aa27
								
							
						
					
					
						commit
						b84b7bad63
					
				| 
						 | 
				
			
			@ -9,8 +9,10 @@ class SessionsController < Devise::SessionsController
 | 
			
		|||
    login_uid = params[:user][:nccu_ldap_uid]
 | 
			
		||||
    result = false
 | 
			
		||||
    ldap = Net::LDAP.new
 | 
			
		||||
    ldap.port = '8001'
 | 
			
		||||
    ldap.host = '127.0.0.1'
 | 
			
		||||
    # ldap.port = '8001'
 | 
			
		||||
    # ldap.host = '127.0.0.1'
 | 
			
		||||
    ldap.port = '389' 
 | 
			
		||||
    ldap.host = '140.119.166.23' 
 | 
			
		||||
    ldap_filter = "(uid=#{login_uid})"
 | 
			
		||||
    ldap_base = 'ou=People,dc=nccu,dc=edu,dc=tw'
 | 
			
		||||
    ldap.authenticate("cn=uccn,ou=profile,dc=nccu,dc=edu,dc=tw","nccu2ucc") 
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
| 
						 | 
				
			
			@ -4,8 +4,8 @@ require 'mysql2'
 | 
			
		|||
 | 
			
		||||
 | 
			
		||||
mid_host = { 
 | 
			
		||||
  :host => '127.0.0.1',  #mruling.nccu.edu.tw
 | 
			
		||||
  :port => 8005,
 | 
			
		||||
  :host => 'mruling.nccu.edu.tw',  #mruling.nccu.edu.tw or 127.0.0.1
 | 
			
		||||
  :port => 3006, #3306 or 8005
 | 
			
		||||
  :username => "root",
 | 
			
		||||
  :password => "a3G6yWd9",
 | 
			
		||||
  :database => "RSS23_NCCU_MIDDLE",
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
		Reference in New Issue