Carmesh Implementation Stories (#1): Modifications to the sanction python OAuth library

(This is the first in our series of posts on issues we found in our implementation work).

Short blog post on an issue we found with a library we’re using…

In carmesh, we’re working on accessing some social services on the user’s behalf. One technology we’re using to access Oauth’d services is sanction – it’s a handy python library which takes care of authentication and provides a nice authenticated way to interact with services.

One issue with the library is that it did not provide control over HTTP headers sent to the service. This was problematic for us when talking to Google Calendar: for some gCal queries which take parameters, the HTTP Content-Type header needs to be specified in the request – this was not supported by the library as shipped.

We made some small modifications to the library to support this. It does not have much in the way of error handling and is not at all robust, so handle with care. Modified version here.

Advertisements

2 thoughts on “Carmesh Implementation Stories (#1): Modifications to the sanction python OAuth library

  1. Sanction author here. The pull request has been updated and merged with the latest version (0.4). Thanks for pointing out this shortcoming.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s