diff --git a/lib/ldap_login/login.rb b/lib/ldap_login/login.rb index b686f65..4fe6f79 100644 --- a/lib/ldap_login/login.rb +++ b/lib/ldap_login/login.rb @@ -12,11 +12,11 @@ module LdapLogin::Login uri = URI(LDAP_ADSERVER) req = Net::HTTP::Post.new(uri, 'Content-Type' => 'application/json') req.body = {AppKey: AppKey,username: ldap_user,password: ldap_pass}.to_json - req.read_timeout = 3000 http = Net::HTTP.new(uri.host, uri.port) http.use_ssl = true http.verify_mode = OpenSSL::SSL::VERIFY_NONE + http.read_timeout = 3 res = http.request(req) if res.code == '200' && JSON.load(res.body)["userID"]==ldap_user