Re: Accessing the REST service from JavaScript

2013-06-18 Thread Lahiru Gunathilake
, 2013 11:46 AM > To: dev@airavata.apache.org > Subject: RE: Accessing the REST service from JavaScript > > So the problem is Cross Domain Authorization. I spent some more time on > this > and added a CORS filter(CORS filter by ebay) on the airavata server side > and > trie

RE: Accessing the REST service from JavaScript

2013-06-18 Thread Viknes Balasubramanee
@airavata.apache.org Subject: RE: Accessing the REST service from JavaScript So the problem is Cross Domain Authorization. I spent some more time on this and added a CORS filter(CORS filter by ebay) on the airavata server side and tried the requests. This time, requests from both firefox and chrome

RE: Accessing the REST service from JavaScript

2013-06-13 Thread Viknes Balasubramanee
-Original Message- From: Amila Jayasekara [mailto:thejaka.am...@gmail.com] Sent: Wednesday, June 12, 2013 10:35 AM To: dev@airavata.apache.org; viknesb Subject: Re: Accessing the REST service from JavaScript Hi Viknes, You still need to set user name as a Authorisation header. I doubt you will

Re: Accessing the REST service from JavaScript

2013-06-12 Thread Amila Jayasekara
>> > >>>>> On Wed, Jun 12, 2013 at 10:29 AM, Viknes Balasubramanee < > >> vikn...@msn.com > >>>>> wrote: > >>>>> > >>>>>> I'd like to avoid a backend server of my own or a proxy server. My > aim

Re: Accessing the REST service from JavaScript

2013-06-12 Thread Suresh Marru
a portable webapp of just HTML and JS pages that can be >>>> included by >>>>>> any client. I am pretty sure I have successfully made cross domain >>>> requests >>>>>> earlier. The only problem here is adding the authorization he

Re: Accessing the REST service from JavaScript

2013-06-12 Thread Amila Jayasekara
sure I have successfully made cross domain > >> requests > >>>> earlier. The only problem here is adding the authorization header and > >> these > >>>> 2 browsers don't allow it. > >>>> > >>>> Amila, > >

Re: Accessing the REST service from JavaScript

2013-06-12 Thread Suresh Marru
cessfully made cross domain >> requests >>>> earlier. The only problem here is adding the authorization header and >> these >>>> 2 browsers don't allow it. >>>> >>>> Amila, >>>> When the security is disabled, should the username be still

Re: Accessing the REST service from JavaScript

2013-06-12 Thread Supun Kamburugamuva
> When the security is disabled, should the username be still set in the > > >> authorization header or can it be passed as a parameter or data > > attribute. > > >> > > >> Thanks > > >> Viknes > > >> > > >>

Re: Accessing the REST service from JavaScript

2013-06-12 Thread Amila Jayasekara
ow it. > >> > >> Amila, > >> When the security is disabled, should the username be still set in the > >> authorization header or can it be passed as a parameter or data > attribute. > >> > >> Thanks > >> Viknes > >> > &g

Re: Accessing the REST service from JavaScript

2013-06-12 Thread Suresh Marru
ameter or data attribute. >> >> Thanks >> Viknes >> >> -Original Message- >> From: Amila Jayasekara [mailto:thejaka.am...@gmail.com] >> Sent: Wednesday, June 12, 2013 9:28 AM >> To: dev@airavata.apache.org >> Cc: viknesb >> Subject: Re:

Re: Accessing the REST service from JavaScript

2013-06-12 Thread Amila Jayasekara
mailto:thejaka.am...@gmail.com] > Sent: Wednesday, June 12, 2013 9:28 AM > To: dev@airavata.apache.org > Cc: viknesb > Subject: Re: Accessing the REST service from JavaScript > > I am not quite sure, issue is more subtle I guess. Cos browser it self > doesnt allow us to manipu

RE: Accessing the REST service from JavaScript

2013-06-12 Thread Viknes Balasubramanee
com] Sent: Wednesday, June 12, 2013 9:28 AM To: dev@airavata.apache.org Cc: viknesb Subject: Re: Accessing the REST service from JavaScript I am not quite sure, issue is more subtle I guess. Cos browser it self doesnt allow us to manipulate headers. But we can try and see. Thanks Amila On Wed, Jun 12,

Re: Accessing the REST service from JavaScript

2013-06-12 Thread Amila Jayasekara
I am not quite sure, issue is more subtle I guess. Cos browser it self doesnt allow us to manipulate headers. But we can try and see. Thanks Amila On Wed, Jun 12, 2013 at 9:21 AM, Supun Kamburugamuva wrote: > From the description my understand was this is a cross domain scripting > issue. If th

Re: Accessing the REST service from JavaScript

2013-06-12 Thread Supun Kamburugamuva
>From the description my understand was this is a cross domain scripting issue. If that is the case, using a proxy server will make all the requests to go through the same server (domain) and avoid the issue. Thanks, Supun.. On Wed, Jun 12, 2013 at 8:58 AM, Amila Jayasekara wrote: > Hi Supun, >

Re: Accessing the REST service from JavaScript

2013-06-12 Thread Amila Jayasekara
Hi Supun, Didn't quite understand how HTTPD going to solve the issue. You meant to (from browser) pass header in different format to HTTPD and set headers at HTTPD server level ? If this is possible could you also point to a reference ? Thanks Amila On Wed, Jun 12, 2013 at 8:28 AM, Supun Kambur

Re: Accessing the REST service from JavaScript

2013-06-12 Thread Supun Kamburugamuva
You can try proxying all your requests through a HTTPD server. May be it will help. Thanks, Supun.. On Wed, Jun 12, 2013 at 12:48 AM, Amila Jayasekara wrote: > Hi Viknes, > > As discussed offline the reason for authentication failure is not getting > "Authorization" header to backend. We experi

Re: Accessing the REST service from JavaScript

2013-06-11 Thread Amila Jayasekara
Hi Viknes, As discussed offline the reason for authentication failure is not getting "Authorization" header to backend. We experienced that Firefox and Chrome does not allow user to set headers while IE allow user to set headers (Correct me if I am wrong). Further [1] describes this restriction in

Accessing the REST service from JavaScript

2013-06-11 Thread Viknes Balasubramanee
Hi All, I am trying to get the list of experiments in Airavata by accessing the Registry API REST service from a webapp. When I make an AJAX request from JavaScript, I get an error in the browser console(FireBug) stating "Access denied to restricted URI". This is the URL that I am trying to hit h