module Lwqzx
Constants
- VERSION
Public Class Methods
auth(login,passwd)
click to toggle source
# File lib/lwqzx.rb, line 5 def self.auth(login,passwd) lurl = "http://www.lwqzx.sdedu.net/kernel/net_school/core/jslogin.php" res = ::RestClient.post lurl,{login: login, password: passwd} hsh = ::JSON.parse(res.body) return {} if hsh["name"].empty? login = hsh["login"] name = hsh["name"] groups = hsh["user_group"] return {login: login, name: name, groups: groups} end