如何检查用户是否在其他应用程序的MediaWiki中登录? [英] How to check if a user is logged on in mediawiki in a different app?

查看:90
本文介绍了如何检查用户是否在其他应用程序的MediaWiki中登录?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这里是情况:

我有一个mediawiki安装,还有一些其他的服务器端脚本,它们需要更多的资源,并且已经用另一种语言(python)编写. python代码将与mediawiki代码非常松散地耦合在一起(只能通过单击此处或此处的链接来调用)

I have a mediawiki installation, and a few additional server-side scripts that require more resources and were already written in a different language (python). The python code will be very loosely coupled with the mediawiki code (only called by clicking on a link here or there)

我想要的是,当将GET或POST命令发送到服务器以执行python脚本时,我想检查用户是否已经登录到mediawiki.如果没有,我想将它们重定向到mediawiki登录页面. 有什么想法吗?

What I would like is that when a GET or POST command is sent to the server to execute a python script, I would like to check to see if a user is already logged in to mediawiki. If not, I would like to just redirect them to the mediawiki login page. Any ideas?

有几篇文章将mediawiki与其他PHP框架(如drupal和论坛软件)集成在一起,但这远远超出了我的需求.

There are several articles on integrating mediawiki with other PHP frameworks like drupal and forum software, but that is more than i need.

What is the best way to do this?
-check for cookies somehow (is this secure?)
-does the mediawiki db keep track of who is logged in?

谢谢

推荐答案

您可以使用

You can use the MediaWiki API to get the userinfo and parse that in XML.

这篇关于如何检查用户是否在其他应用程序的MediaWiki中登录?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆