【发布时间】:2020-05-08 20:37:00
【问题描述】:
我正在尝试通过其 API 将 LimeSurvey 与我自己的 Web 服务器集成。我自己的网络服务器有自己的用户名和密码,我的网络服务器需要通过 API 对用户进行身份验证。
有没有办法调用 LimeSurvey get_session_key API (JSON-RPC),但不使用 AuthDB? (我不能使用 AuthLDAP)。有没有办法使用,例如,Authwebserver,而不是使用 Authwebserver 插件,以允许我的 Web 服务器通过 JSON-RPC API 对用户进行身份验证?
以下不起作用:
curl --location --request POST 'https://mysurveyserver/index.php/admin/remotecontrol' --header 'Content-Type: application/json' --header 'Accept: application/json' --header 'Content-Type: text/plain' --header 'Cookie: PHPSESSID=abcdefghijklmnopqrstuvwxyz'
--data-raw '{
"jsonrpc": "2.0",
"method": "get_session_key",
"params": [
"username@email.com",
"anydummypassword",
"Authwebserver"
],
"id": 1
}'
这会返回一个响应:
{"id":1,"result":{"status":"Invalid user name or password"},"error":null}
提前致谢。
【问题讨论】:
-
抱歉问。用户名和密码是否存在于 Limesurvey 网络服务器中? authwebserver 插件是否处于活动状态并已配置?不热衷于 authwebserver,但我会朝那个方向检查。
标签: json api rpc limesurvey