lwqzx_auth 0.1.7 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/app/controllers/lwqzx_auth/auth_controller.rb +3 -3
- data/lib/lwqzx_auth/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d4b00982373eba2a84a4e76fa0e5ba32e4d9d608d2e9c5300ab16b3ee3a6561
|
4
|
+
data.tar.gz: ef0ce7b8438bcfc94c2793a1782c969a659488afda9ff7314483ba8643ca8af4
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1bd0a40a3259435762dad096e1a712bfe95dc26c0ccc442ed0d3895bbe4669769befc1e22569cb29ef5fcb167780b996748009e57874b29b74a9a4ec5ad70e78
|
7
|
+
data.tar.gz: ffd61567689bcb3f120917a4f0f6876bba4c61fef787dbeab6901b91ba681689970db9787a2c3196168d4859f79a9d5c95de3ca5dd6091790042511eac309f52
|
@@ -21,9 +21,10 @@ module LwqzxAuth
|
|
21
21
|
login = params[:login]
|
22
22
|
psd = params[:password]
|
23
23
|
hsh = lauth(login,psd)
|
24
|
-
if hsh["
|
24
|
+
if hsh["name"].blank?
|
25
25
|
redirect_to login_path , alert: "用户信息有误"
|
26
26
|
else
|
27
|
+
login = hsh["login"]
|
27
28
|
name = hsh["name"]
|
28
29
|
groups = hsh["user_group"]
|
29
30
|
session[:login] = login
|
@@ -37,8 +38,7 @@ module LwqzxAuth
|
|
37
38
|
def lauth(login,passwd)
|
38
39
|
lurl = "http://www.lwqzx.sdedu.net/kernel/net_school/core/jslogin.php"
|
39
40
|
res = ::RestClient.post lurl,{login: login, password: passwd}
|
40
|
-
|
41
|
-
return content
|
41
|
+
return JSON.parse(res.body)
|
42
42
|
end
|
43
43
|
|
44
44
|
end
|
data/lib/lwqzx_auth/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: lwqzx_auth
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- zxy
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-10-
|
11
|
+
date: 2019-10-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rest-client
|