{"id":183,"date":"2014-03-22T15:54:29","date_gmt":"2014-03-22T14:54:29","guid":{"rendered":"http:\/\/blog.magnusmanske.de\/?p=183"},"modified":"2014-03-22T15:54:29","modified_gmt":"2014-03-22T14:54:29","slug":"the-oauth-haters-faq","status":"publish","type":"post","link":"http:\/\/magnusmanske.de\/wordpress\/archives\/183","title":{"rendered":"The OAuth haters&#8217; FAQ"},"content":{"rendered":"<p>Shortly after the dawn of the toolserver, the necessity for authentication in some tools became apparent. We couldn&#8217;t just let anyone use tools to upload files to Commons, doing so anonymously, hiding behind the tools&#8217; user account; that would be like allowing anyone to edit Wikipedia anonymously. Crazy talk! But toolserver policies forbade tools asking for users&#8217; Wikipedia\/Commons passwords. So, different tool authors came up with different solutions; I created <a href=\"https:\/\/tools.wmflabs.org\/tusc\/\">TUSC<\/a> to have a single authentication mechanism across my various tools.<\/p>\n<p>As some of you may have noticed, some of my new tools that require authentication are using <a href=\"https:\/\/blog.wikimedia.org\/tag\/oauth\/\">OAuth<\/a> instead of TUSC. Not only that, but I have been busy porting some of my long-standing tools, like <a href=\"http:\/\/tools.wmflabs.org\/flickr2commons\/\">flickr2commons<\/a> and now <a href=\"http:\/\/tools.wmflabs.org\/commonshelper\/index.php\">commonshelper<\/a>, to OAuth. This has been met with &#8230; unease by various parties. I hope that this post can alleviate some concerns, or at least answer some questions.<\/p>\n<p>Q: <em>Why did you switch from TUSC to OAuth?<\/em><br \/>\nA: TUSC was a crutch, and always has been. Not only is OAuth a standard technology, it is now also the &#8220;official&#8221; way to use tools that require user rights on Wikimedia sites.<\/p>\n<p>Q: <em>So I&#8217;m not uploading as your bot, but as myself?<\/em><br \/>\nA: Yes! You took the time and interest to run the tool; that effort should be rewarded, by having the upload associated with your use account. It will be so much easier to see who uploaded a file, to assign glory and blame alike. Also, the army of people who have been haunting me for re-use rights and image sources, just because my name was linked to the uploading bot account, will now come after YOU! Progress!!<\/p>\n<p>Q: <em>OK, maybe for new tools. But the old tools were working fine!<\/em><br \/>\nA: No, they were not. Years ago, when the WMF changed API login procedure,\u00a0 I switched my tools to use the Peachy toolkit, so I would not have to do the &#8220;fiddly bits&#8221; myself for every tool. However, a few month ago, something changed again, causing the Peachy uploads to fail. It turned out that Peachy was no longer developed, so I had to go back and hack my own upload code. Something was wrong with that as well, leading to a flurry of bug reports across my Commons-uploading tools. The subsequent switch to OAuth uploads wasn&#8217;t exactly smooth for me either, but now that it&#8217;s running, it should work nicely for a while. Yeah, right.<\/p>\n<p>Q: <em>But now all the tools are using JavaScript to upload. I hate JavaScript!<\/em><br \/>\nA: That pesky JavaScript is all over the web these days. So you probably have installed NoScript in your browser (if you don&#8217;t, do!). You can easily set an exception for the tools server (or specific tools), so you&#8217;re safe from the evil JavaScript out there, while the tools &#8220;just work&#8221;.<\/p>\n<p>Q: <em>But now it won&#8217;t work in my text browser!<\/em><br \/>\nA: Text browser? In 2014? Really? You seem to be an old-school 1337 hax0r to be using that. All tools on <a href=\"http:\/\/tools.wmflabs.org\">tools.wmflabs.org<\/a> are multi-maintainer; I&#8217;ll be happy to add you as a co-maintainer, so you can add a text browser mode to any tool you like. You don&#8217;t have time, you say? Fancy that. In the meantime, you could use <a href=\"https:\/\/en.wikipedia.org\/wiki\/ELinks\">elinks<\/a> which can support JavaScript.<\/p>\n<p>Q: <em>But you changed my favourite tool! I don&#8217;t like change.<\/em><br \/>\nA: Sorry, Sheldon. The only constant is change.<\/p>\n<p>In closing, the <a href=\"https:\/\/commons.wikimedia.org\/wiki\/User:File_Upload_Bot_%28Magnus_Manske%29\">good old bot<\/a> has clocked over 1.2 million uploads on Commons, or ~6% of all files there. I think it deserves some well-earned rest.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Shortly after the dawn of the toolserver, the necessity for authentication in some tools became apparent. We couldn&#8217;t just let anyone use tools to upload files to Commons, doing so anonymously, hiding behind the tools&#8217; user account; that would be like allowing anyone to edit Wikipedia anonymously. Crazy talk! But toolserver policies forbade tools asking [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-183","post","type-post","status-publish","format-standard","hentry","category-uncategorized"],"_links":{"self":[{"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/posts\/183","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/comments?post=183"}],"version-history":[{"count":4,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/posts\/183\/revisions"}],"predecessor-version":[{"id":187,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/posts\/183\/revisions\/187"}],"wp:attachment":[{"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/media?parent=183"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/categories?post=183"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/magnusmanske.de\/wordpress\/wp-json\/wp\/v2\/tags?post=183"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}