Hi all When invokling an XQuery via REST, eg. http://mydomain.com:8984/rest?run=scripts/myscript.xq I'm prompted to type in the user and password for authentication. This is ok when a script needs user authentication to connect to a database. But when the script only uses the XQuery processor to output a (generated) HTML page it would be easier if the user authentication could by included in the URL, eg http://mydomain.com:8984/rest?run=scripts/myscript.xq&user=tester&password=p... Is there a way to bypass the authentication dialog this way? I tried with the parameters "user" and "password" as shown in the example above, but this dosn't work. ThnxMike
Hi Mike, If you use basic authentication (which is the default), you can specify your credentials in the URL: http://tester:pwd@mydomain.com:8984/rest?run=scripts/myscript.xq Hope this helps, Christian On Tue, May 3, 2016 at 6:19 PM, Mike Cobo <mikecobo@yahoo.com> wrote:
Hi all
When invokling an XQuery via REST, eg. http://mydomain.com:8984/rest?run=scripts/myscript.xq I'm prompted to type in the user and password for authentication. This is ok when a script needs user authentication to connect to a database. But when the script only uses the XQuery processor to output a (generated) HTML page it would be easier if the user authentication could by included in the URL, eg
http://mydomain.com:8984/rest?run=scripts/myscript.xq&user=tester&password=p...
Is there a way to bypass the authentication dialog this way? I tried with the parameters "user" and "password" as shown in the example above, but this dosn't work.
Thnx Mike
Hi Christian Thanks for your hint, - this is exactly what I was looking for! Regards,Mike From: Christian Grün <christian.gruen@gmail.com> To: Mike Cobo <mikecobo@yahoo.com> Cc: "basex-talk@mailman.uni-konstanz.de" <basex-talk@mailman.uni-konstanz.de> Sent: Tuesday, May 3, 2016 9:56 PM Subject: Re: [basex-talk] User and Password in REST URL Hi Mike, If you use basic authentication (which is the default), you can specify your credentials in the URL: http://tester:pwd@mydomain.com:8984/rest?run=scripts/myscript.xq Hope this helps, Christian On Tue, May 3, 2016 at 6:19 PM, Mike Cobo <mikecobo@yahoo.com> wrote:
Hi all
When invokling an XQuery via REST, eg. http://mydomain.com:8984/rest?run=scripts/myscript.xq I'm prompted to type in the user and password for authentication. This is ok when a script needs user authentication to connect to a database. But when the script only uses the XQuery processor to output a (generated) HTML page it would be easier if the user authentication could by included in the URL, eg
http://mydomain.com:8984/rest?run=scripts/myscript.xq&user=tester&password=p...
Is there a way to bypass the authentication dialog this way? I tried with the parameters "user" and "password" as shown in the example above, but this dosn't work.
Thnx Mike
participants (2)
-
Christian Grün -
Mike Cobo