Hi Jun,
the REST api also takes into account Wikis, so you should take into
account this into the plugin.
-Fabio
On Tue, Jun 7, 2011 at 7:35 AM, Jun Han <jun.han37(a)gmail.com> wrote:
Hi Fabio,
I have finished replacing xmlrpc implementation of login functionality
by sending http GET request to entry point
(
http://localhost:8080/xwiki/rest/) along with username/password.
A status code of 200 will be regarded as successful while 401 means
login fails.
The source code have been updated in org.xwiki.eclipse.ui and
org.xwiki.eclipse.core plugins.
I will begin working on xwiki navigatoin panel and replace xmlrpc code
accordingly.
One question is what resources are to be included in navigation panel,
besides xwiki -> space -> pages? and how to display them?
Best regards
Jun Han
On 06/05/2011 05:50 PM, Fabio Mancinelli wrote:
Hi Jun,
login/logout can be implemented in order to store on the client side
user credentials that are sent with HTTP requests.
Currently there is no way in the REST-api to get a "session token"
(like the cookie sent after a login is made using the web form) so
that subsequent requests are performed on the behalf of a previously
authenticated user.
So what is usually done is to send basic-auth credentials with each request.
You can start with this. Next you might try to retrieve the cookie by
faking a standard login and using that cookie in subsequent requests.
The ideal setting would be to implement server side some OAuth-like
mechanism, but this is out of scope wrt your project.
-Fabio
On Sat, Jun 4, 2011 at 6:27 PM, Jun Han<jun.han37(a)gmail.com> wrote:
Dear all,
I am on the way of replacing the xmlrpc implementation of
RemoteXWikiDataStorage implements IDataStorage {}.
One question is about how to implement login and logout functionality
via REST API.
From REST API document, users can be authenticated via something like:
1. XWiki session
2. HTTP Basic Auth.
HTTP basic auth can be implemented via adding HTTP header to the HTTP
request, then XEclipse can display Xwiki Resources by parsing the response.
Therefore, do we need to implement login and logout methods?
Best regards
Jun Han
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs