[xwiki-users] passing username and password with the URL
Hi all, We are using XWiki to share/develop R code. R has a source() command that can call a remote web page where the code is stored and execute it locally. We can figure out more sophisticated ways of getting R involved, but as an starting point it could be enough to be able to call restricted access XWiki URLs from local R installations with the source() command. Thus, I think that we need to send to XWiki the username and the password together with this URL. Please, could you now if this is possible and point me in the right direction? Thanks! Best regards, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
Hi all,
We are using XWiki to share/develop R code.
R has a source() command that can call a remote web page where the code is stored and execute it locally. We can figure out more sophisticated ways of getting R involved, but as an starting point it could be enough to be able to call restricted access XWiki URLs from local R installations with the source() command. Thus, I think that we need to send to XWiki the username and the password together with this URL.
Please, could you now if this is possible and point me in the right direction? Thanks!
Best regards,
Ricardo
Hi, Following some advise from people in the R r-help e-mail list and from some other threads here I can read the following authentication header: ---------------------------------------------------------- http://MyHostName/xwiki/bin/loginsubmit/XWiki/XWikiLogin POST /xwiki/bin/loginsubmit/XWiki/XWikiLogin HTTP/1.1 Host: MyHostName User-Agent: Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.12) Gecko/20080201 Firefox/2.0.0.12 Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 Accept-Language: en,en-us;q=0.7,es-es;q=0.3 Accept-Encoding: gzip,deflate Accept-Charset: UTF-8,* Keep-Alive: 300 Connection: keep-alive Referer: http://MyHostName/xwiki/bin/login/XWiki/XWikiLogin?xredirect=http%3A%2F%2FMy... Cookie: JSESSIONID=A89FBB1701789DE208FFDBD732E9EFFD; style=default Content-Type: application/x-www-form-urlencoded Content-Length: 146 xredirect=http%3A%2F%2FMyHostName%2Fxwiki%2Fbin%2Fview%2FMain%2F&j_username=xxxxxxxxx&j_password=xxxxxxxxx&j_rememberme=true HTTP/1.x 302 Moved Temporarily Server: Apache-Coyote/1.1 Set-Cookie: username=xxxxxxxxx==; Expires=Sun, 02-Mar-2008 11:26:15 GMT; Path=/ Set-Cookie: password=xxxxxxxxx==; Expires=Sun, 02-Mar-2008 11:26:15 GMT; Path=/ Set-Cookie: rememberme=true; Expires=Sun, 02-Mar-2008 11:26:15 GMT; Path=/ Set-Cookie: validation=2ea9cbeb40bdafc8314b50f18b440e30; Expires=Sun, 02-Mar-2008 11:26:15 GMT; Path=/ Location: http://MyHostName/xwiki/bin/view/Main/ Content-Type: text/html;charset=ISO-8859-1 Content-Language: en Content-Length: 0 Date: Sat, 16 Feb 2008 11:26:15 GMT ---------------------------------------------------------- I've replaced username and password values with xxxxxxxxx and the real hostname with MyHostName. In xredirect I can easily identify : as %3A and / as %2F. But, is it possible to pass the string &j_ in an "regular" URL? Is this possible to pass username and password with this string as an URL to access a restricted access document or it is a requirement that the cookies are set before the client can read it? For instance, could I pass username and password with the following URL...? http://xepecnet.environmentalchange.net/xwiki/bin/view/ICT/RGraphicSample01?... I keep trying to pass the code in this document to R. This is what I get right now...
source("http://xepecnet.environmentalchange.net/xwiki/bin/view/ICT/RGraphicSample01?...") Error in file(file, "r", encoding = encoding) : unable to open connection In addition: Warning message: In file(file, "r", encoding = encoding) : cannot open: HTTP status was '401 Unauthorized' Thanks for your help! Best, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
Sorry for insisting on this. Please, is it a complete folly to try to do this? I do need to find an option to share R code being able to manage access control. Thanks for any insight! Cheers, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
Sorry for insisting on this. Please, is it a complete folly to try to do this? I do need to find an option to share R code being able to manage access control.
Thanks for any insight!
Cheers,
Ricardo
Hi, I'm also interested in this, but for the moment it is not a top priority. It will probably be in 1.4. Or, if you can provide a patch... -- Sergiu Dumitriu http://purl.org/net/sergiu/
Sergiu Dumitriu wrote:
Hi,
I'm also interested in this, but for the moment it is not a top priority. It will probably be in 1.4. Or, if you can provide a patch...
Thanks Sergiu. I did need what the community thinks about this. I keep following other threads trying to find an answer. Cheers, Ricardo -- Ricardo Rodríguez Your EPEC Network ICT Team
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
Sergiu Dumitriu wrote:
Hi,
I'm also interested in this, but for the moment it is not a top priority. It will probably be in 1.4. Or, if you can provide a patch...
Thanks Sergiu. I did need what the community thinks about this. I keep following other threads trying to find an answer.
Cheers,
Ricardo
You can watch and vote for http://jira.xwiki.org/jira/browse/XWIKI-2018 -- Sergiu Dumitriu http://purl.org/net/sergiu/
Sergiu Dumitriu wrote:
[Ricardo Rodriguez] Your EPEC Network ICT Team wrote:
Sergiu Dumitriu wrote:
Hi,
I'm also interested in this, but for the moment it is not a top priority. It will probably be in 1.4. Or, if you can provide a patch...
Thanks Sergiu. I did need what the community thinks about this. I keep following other threads trying to find an answer.
Cheers,
Ricardo
You can watch and vote for http://jira.xwiki.org/jira/browse/XWIKI-2018
Done! Thanks for the tip. Best, -- Ricardo Rodríguez Your EPEC Network ICT Team
participants (2)
-
[Ricardo Rodriguez] Your EPEC Network ICT Team -
Sergiu Dumitriu