You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have been trying to adapt this gem to support the Authorization: Bearer $TOKEN method for authenticating using a token retrieved from OAuth.
I was able to hack in the header, but since the gem uses a singleton, every call to Asana::Anything will use the same credentials. In a common use case, this means one user's credentials can be set, and then another user in another session can use those credentials.
This seems a little backwards... IMHO the gem should /only/ support per-session authentication, since that's the most common use case.
To do this, we'd instantiate a new Asana object and pass it a $TOKEN or $API_KEY, that object would then use the supplied credentials for the life of the object. Calling Asana:: module directly shouldn't be allowed.
You can take a look at my modifications here: http://github.com/tronathan/asana - I'm happy to do the work to make this work as an instance object, but I need some pointers. Not sure how to make ActiveResource work that way.
The text was updated successfully, but these errors were encountered:
I have been trying to adapt this gem to support the Authorization: Bearer $TOKEN method for authenticating using a token retrieved from OAuth.
I was able to hack in the header, but since the gem uses a singleton, every call to Asana::Anything will use the same credentials. In a common use case, this means one user's credentials can be set, and then another user in another session can use those credentials.
This seems a little backwards... IMHO the gem should /only/ support per-session authentication, since that's the most common use case.
To do this, we'd instantiate a new Asana object and pass it a $TOKEN or $API_KEY, that object would then use the supplied credentials for the life of the object. Calling Asana:: module directly shouldn't be allowed.
You can take a look at my modifications here: http://github.com/tronathan/asana - I'm happy to do the work to make this work as an instance object, but I need some pointers. Not sure how to make ActiveResource work that way.
The text was updated successfully, but these errors were encountered: