开发者

If I am using 2-legged OAuth to authorize HTTP requests that contain XML in the body, where do the OAuth parameters go?

Should they be HTTP Headers or should they be form parameters?

If they were form parameters, wouldn't that conflict with the fact that the content is XML?

If they were HTTP Headers, would that violate the OAuth specification?

edit: Should I put them in the actual XML?

Note: 2-legged OA开发者_开发技巧uth simply means it does not need to worry about request tokens, it is just a single call alternative to HTTP Basic authentication... there is incoming data like this:

 oauth_consumer_key:
        dpf43f3p2l4k3l03 
    oauth_token:
        (Empty value) 
    oauth_signature_method:
        HMAC-SHA1 
    oauth_timestamp:
        1191242096 
    oauth_nonce:
        kllo9940pd9333jh 
    oauth_version:
        1.0 


You should put the parameters into the authorization header. OAuth has a spec for it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜