LimeSurvey:无论如何要使用 get_session_key , JSON-RPC 和 Authwebserver?

Posted

技术标签:

【中文标题】LimeSurvey:无论如何要使用 get_session_key , JSON-RPC 和 Authwebserver?【英文标题】:LimeSurvey: anyway to use get_session_key , JSON-RPC with Authwebserver? 【发布时间】: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,但我会朝那个方向检查。 【参考方案1】:

目前无法通过网络服务器进行身份验证。

您可以尝试构建自己的系统,需要注册到remoteControlLogin。

目前Authwebserver 插件与 API 不兼容。不过提醒一下:你是怎么sedn信息认证的?由于您的网络服务器对自身进行身份验证:您必须以相同的方式进行身份验证,而 LimeSurvey 不知道您当前如何通过网络服务器进行身份验证……

【讨论】:

以上是关于LimeSurvey:无论如何要使用 get_session_key , JSON-RPC 和 Authwebserver?的主要内容,如果未能解决你的问题,请参考以下文章

LimeSurvey 远程控制 - 在 import_survey 中途失败

搭建 LimeSurvey投票调查问卷系统

尝试发布到 Limesurvey RC API 时出现 Node.js 错误,ECONNREFUSED

LimeSurvey Remote Control API:获取标记为“N/A”的无关响应

LimeSurvey RemoteControl2 API - 任何 add_response PHP 示例?

单选题 - 预填其他答案文本