if type(sdat) == "table" and
type(sdat.values) == "table" and
type(sdat.values.token) == "string" and
- type(sdat.values.secret) == "string" and
type(sdat.values.username) == "string" and
util.contains(allowed_users, sdat.values.username)
then
util.ubus("session", "set", {
ubus_rpc_session = login.ubus_rpc_session,
values = {
- token = sys.uniqueid(16),
- secret = sys.uniqueid(16)
+ token = sys.uniqueid(16)
}
})
if sdat then
return {
sid = sid,
- token = sdat.token,
- secret = sdat.secret
+ token = sdat.token
}
end
end