所以我正在测试Rest OAuth实现.我的测试工具将发送HTTP请求,但我需要准备Authorization标头.
我需要的是:我想要一个有效的授权标题
我拥有:除了oauth_signature之外的所有标题我还有2个秘密,即token_secret和consumer_secret.我也拥有access_token.所以它真的归结为,不得不签署这个请求.我怎么做?
简介:我只需要为RESTful服务填充Authorization标头的oauth_signature部分.我该怎么做?
基本上:
oAuthHeader="OAuth";
oAuthHeader=oAuthHeader+" oauth_signature_method="+oauth_signature_method;
oAuthHeader=oAuthHeader+",oauth_version="+oauth_version;
oAuthHeader=oAuthHeader+",oauth_nonce="+oauth_nonce;
oAuthHeader=oAuthHeader+",oauth_timestamp="+oauth_timestamp;
oAuthHeader=oAuthHeader+",oauth_consumer_key="+oauth_consumer_key;
oAuthHeader=oAuthHeader+",oauth_token="+oauth_token;
oAuthHeader=oAuthHeader+",oauth_signature="+**oauth_signature**;
Authorization = oAuthHeader;
Run Code Online (Sandbox Code Playgroud)
我的问题是我没有oauth_signature部分.我不知道如何得到它.请帮忙?