[Midas] authenticated access
Mona Wong
mona at sdsc.edu
Wed Jun 27 20:56:18 EDT 2012
Hi Zach:
I'm trying to get the useSession parameter working for the web API call from the application Annio but am getting "{"stat":"fail","message":"This item doesn't exist or you don't have the permissions.","code":-151}" returned instead.
The interesting thing is that I am able to make the call manually in my browser and it works.
Annio and Midas are installed on the same server (http://idash-images.sdsc.edu/annio/ and http://idash-images.sdsc.edu/midas/, respectively) and I know the session has not expired yet.
Any other idea why Annio get a failure result while the browser works fine?
thanks,
Mona
On Jun 25, 2012, at 6:14 PM, Zach Mullen wrote:
> You may be able to use the session for this; if you pass the "useSession" parameter to a web API method, it will attempt to use session authentication instead of the web API token, but this only works for clients that support session cookies. So the question is, how is Annio going to write data back into Midas? If the application is running in the same place as Midas, you should be able to just pass useSession to the web API assuming the user's session is still active. That seems to me that it would work because Annio is an HTML5 application and is running in the browser, so it would have all of the same session cookies from the Midas instance.
>
>
> Thanks,
>
> Zach
*********************************************
Mona Wong
Web & iPad Application Developer
San Diego Supercomputer Center
You are the light you wish to see.
*********************************************
More information about the Midas
mailing list