Hey Eric,
Definitely go with what brent says. It's the best way to do it.
I'm working on some REST support for queries that will help in getting automatically generated JS-API forms. It works with the JS-API in a complementary way. When I have deployed it, you can access your queries like this (for a query named LOGIN with parameters named "uname" and "pwd"):
.../account/db/q/LOGIN?uname=bob&pwd=xxxxxx
or you can also access them like this (more of a REST-style that doesn't user query parameters):
.../account/db/q/LOGIN/uname/bob/pwd/xxxxxxx
Here is how you will be able to automatically get a JavaScript form that brent mentioned for submitting a query (sort of automatic JS-API form generation):
.../account/db/q/LOGIN/form
I'm also working on a system that will let you load and store cookies. So let's say you want to log someone in once, and then automatically pass their username and password as encrypted cookies. When you login the user, you simply state that you want the uname and pwd to be set as encrypted cookies. It will look something like this:
.../account/db/q/LOGIN/uname;set-cookie/bob/pwd;set-cookie/xxxxxxx
Then subsequent queries (ones that would access private user data) can grab the encrypted cookies from the HTTP Session as though the user had entered them himself. So let's say we have a query named "GET_SECRETS":
.../account/db/q/GET_SECRETS/uname;get-cookie//pwd;get-cookie//
In the URL above, notice that the space where you would ordinarily pass the username and password is left blank --- that's because nextdb will fill them in by getting the encrypted cookies from the HTTP session.
-geoff
--
You received this message because you are subscribed to the Google Groups "NextDB Users" group.
To post to this group, send email to nextd...@googlegroups.com.
--
http://nextdb.net - RESTful Relational Database
http://www.nextdb.net/wiki/en/REST