From a2ec4b9334328ec6349cea7758ffa11863e466d3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B1=E5=8D=9A=E4=BA=9E?= Date: Mon, 24 Jan 2022 12:59:59 +0800 Subject: [PATCH] fix error --- lib/ldap_login/login.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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