[Iplant-api-dev] Foundation API and urllib2 in Python
Rion Dooley
dooley at tacc.utexas.edu
Tue Jul 2 12:14:26 MST 2013
Thanks for the update, Darren.There will never be a time when a call to the auth service will not force authentication. You should have been seeing the expected behavior out of the auth service from shortly after you sent the email last week, but if not, please let me know and I will make sure it is patched.
-
Rion
----- Reply message -----
From: "Darren Boss" <dboss at email.arizona.edu>
To: "Rion Dooley" <dooley at tacc.utexas.edu>
Cc: "Discussion of iPlant API development" <iplant-api-dev at iplantcollaborative.org>
Subject: [Iplant-api-dev] Foundation API and urllib2 in Python
Date: Tue, Jul 2, 2013 8:39 AM
I realize this was done on purpose since certain api calls return
different data when not authenticated just like GET and POST calls to
the same url behave differently. I have working python code to set the
authorization header:
https://gist.github.com/netscruff/5886593
On Thu, Jun 27, 2013 at 4:48 PM, Darren Boss <dboss at email.arizona.edu> wrote:
> I've been trying to use the foundation API via Python and I think I've
> found an issue with /auth-v1/ requests. The urllib2 library in Python
> won't authenticate unless the http response contains HTTP code 401
> Unauthorized and a key "WWW-Authenticate". The key is missing so any
> requests to /auth-v1/ fail. I did a test with /io-v1/ and it does
> include WWW-Authenticate and authenticates correctly. I guess the only
> thing I wouldn't be able to do is get a token for the username but I
> thought I would raise the issue to see if it was just an oversight in
> the API development or if this was done on purpose.
_______________________________________________
Iplant-api-dev Mailing List: Iplant-api-dev at iplantcollaborative.org
List Info and Archives: http://mail.iplantcollaborative.org/mailman/listinfo/iplant-api-dev
One-click Unsubscribe: http://mail.iplantcollaborative.org/mailman/options/iplant-api-dev/dooley%40tacc.utexas.edu?unsub=1&unsubconfirm=1
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.iplantcollaborative.org/pipermail/iplant-api-dev/attachments/20130702/3538c107/attachment.html
More information about the Iplant-api-dev
mailing list