Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 339793

Summary: [patch] support authentication (+cookies) for mediawiki pages behind requiring it
Product: z_Archived Reporter: Endre Kovács <ekovacs>
Component: MylynAssignee: Project Inbox <mylyn-triaged>
Status: RESOLVED WONTFIX QA Contact:
Severity: enhancement    
Priority: P3 CC: greensopinion
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
proposed patch for mediawiki-wikitext authentication support
none
patch recut against the head of wikitext git repo.
none
mylyn/context/zip none

Description Endre Kovács CLA 2011-03-12 11:30:00 EST
Build Identifier: 20100917-0705

the ant task mediawiki-to-eclipse-help exposed by mylyn wikitext module has the capability to fetch mediawiki pages from the internet by using an inputstream on the URL computed for the resource.

(line 228, org.eclipse.mylyn.internal.wikitext.mediawiki.core.tasks.WikiToDocTask.class in org.eclipse.mylyn.wikitext.mediawiki.core_1.3.0.v20100608-0100-e3x.jar)

the request would be to implement two more argument for the task so that we could pass in a name and a pass for authenticating our wikipage. 

OR

one argument which would be an input text file that would contain cookie entries for the authentication of this task for the given URL.

i manage to attain such cookie files by calling out for CURL or WGET from my ant file.



Reproducible: Always

Steps to Reproduce:
1. write ant script using mediawiki-to-eclipse-help
2. give a mediawiki page that requires authentication as value for the argument "wikiBaseUrl"
3. running the script cannot get the content of the wikipage because that needs authentication
Comment 1 David Green CLA 2011-03-14 13:16:44 EDT
Thanks for the feature request.  Feel free to submit a patch.
Comment 2 Endre Kovács CLA 2011-03-16 18:27:04 EDT
Created attachment 191363 [details]
proposed patch for mediawiki-wikitext authentication support

Just created a small patch that did the auth. for me. also minor modification on imagefetching strategy.
altogether seem to work well.
Comment 3 David Green CLA 2011-03-18 20:30:04 EDT
Endre, thanks for the patch.  Can you please re-cut the patch against the latest (in the Git repository)?   It seems that this patch was produced against an older version of WikiText.
Comment 4 Endre Kovács CLA 2012-02-24 12:29:07 EST
Created attachment 211590 [details]
patch recut against the head of wikitext git repo.

re-cutting patch against org.eclipse.mylyn.docs/.git
as requested.
Comment 5 David Green CLA 2012-02-27 18:11:22 EST
Thanks Endre.  I've pushed the patch out to Gerrit for review: http://review.mylyn.org/#change,336

The contribution looks good.  I've added some comments to the review - please take a look when you get the chance.
Comment 6 David Green CLA 2012-02-27 18:12:23 EST
Created attachment 211701 [details]
mylyn/context/zip
Comment 7 Steffen Pingel CLA 2012-05-16 07:02:43 EDT
David, can you move the change to git.eclipse.org/r?
Comment 8 David Green CLA 2012-05-17 19:52:45 EDT
created a new review: https://git.eclipse.org/r/#change,6021
Comment 9 David Green CLA 2013-08-02 12:44:16 EDT
Closed as part of backlog clean-up.  Please re-open if you'd like to see this revisited, perhaps with a contribution.