Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use with private wikis #28

Open
AdSvS opened this issue Aug 4, 2016 · 6 comments
Open

Use with private wikis #28

AdSvS opened this issue Aug 4, 2016 · 6 comments

Comments

@AdSvS
Copy link

AdSvS commented Aug 4, 2016

This very interesting extension works only with public wiki's. For a query to work on a private wiki a login is needed.

On https://www.mediawiki.org/wiki/API:Login this is documented.

Attached is code that creates pages in a wiki from email messages. It contains code for login as well, so it might be used as an example.

EmailBot.zip

@mwjames
Copy link
Contributor

mwjames commented Aug 4, 2016

On https://www.mediawiki.org/wiki/API:Login this is documented.

Okay, just by reading "...In MediaWiki versions before 1.27, only the login action is available and should be used by all clients needing to login. As of 1.27, the login action should only be used in combination with bot passwords, and clientlogin should be used by interactive applications...." gives me the shivers as it means you require different methods with different MW versions.

Trying to make a sane interface out of this is not going to happen overnight and ranks fairly low on my priority list as its smells to be of some sort of spaghetti code.

I'm leaving the issue open in case someone wants to tackle this.

@AdSvS
Copy link
Author

AdSvS commented Aug 4, 2016

I'm not sure I agree. My interpretation is that using the 'login' action (in combination with bot passwords) is the appropriate way for this use case and will work for MW 1.27 as well as older versions.
So no shivers here yet and only spaghetti bolognese :-)

@kghbln
Copy link
Member

kghbln commented Aug 5, 2016

If a login action was also possible in combination with bot passwords prior to MW 1.27 then supporting two different methods will not be an issue. In this case the other method would just not be supported for earlier versions of MW. Also MW 1.26 is EOL in November 2016 and MW 1.23 is EOL in May 2017 so there is no real pressure to support pre MW 1.27 methods.

Still an enhancement like this takes time and effort which needs to be allocated somehow by someone at some time.

@mwjames
Copy link
Contributor

mwjames commented Aug 7, 2016

Still an enhancement like this takes time and effort which needs to be allocated somehow by someone at some time.

Exactly.

In the meantime, the error output in Special:Ask has been improved to display failed responses more clearly.

@mwjames
Copy link
Contributor

mwjames commented Sep 7, 2016

[0] discussion provides some insides about the "How to login with API?"

[0] https://lists.wikimedia.org/pipermail/wikitech-l/2016-September/086434.html

@tosfos
Copy link

tosfos commented Oct 14, 2018

WikiWorks is working on a solution for this issue. We should have something shortly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants