[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

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:


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: Gecko/20080201 Firefox/
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
Cookie: JSESSIONID=A89FBB1701789DE208FFDBD732E9EFFD; style=default
Content-Type: application/x-www-form-urlencoded
Content-Length: 146
HTTP/1.x 302 Moved Temporarily
Server: Apache-Coyote/1.1
Set-Cookie: username=xxxxxxxxx==; Expires=Sun, 02-Mar-2008 11:26:15 GMT; 
Set-Cookie: password=xxxxxxxxx==; Expires=Sun, 02-Mar-2008 11:26:15 GMT; 
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...?


I keep trying to pass the code in this document to R. This is what I get 
right now...

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!



Ricardo Rodríguez
Your EPEC Network ICT Team

users mailing list

Reply via email to