How do I do 2-legged OAuth to give a script access to a registered application
I'm trying to write a python script (using requests and requests_oauthlib) which can make authorized requests to my jazz application, but I'm having some problems getting authorized.
My limited understanding of how OAuth works in Jazz is that I should be able to do two-legged oauth where the consumer (my script) makes requests to the provider (my jazz application) using the consumer key/secret pair that is found as an 'Authorized Key' in the 'Consumers (Inbound)' section of the application admin page. Also, according to some examples, I should pass in ""/"" as the token/token-secret pair. Then with those 4 properties I should be authorized on any request. Is that correct so far?
At the moment, my application (RELM in this case) always responds with 401 Unauthorized. Am I missing something fundamental here about how to perform the 2-legged OAuth? or is it that RELM or other jazz applications just might not support this?
EDIT: The relationship I'm trying to create between my script and the application, is the same as the one when an application does a login using functional user on the JTS as described in this Jazz article: Delegating Authentication to JTS