Signpost の以前のバージョンは、ヘッダーに OAuth パラメータのみを実装しています。freelanecer.com API は、パラメーターがクエリ文字列にあることを想定しています。Signpost の最新バージョンでは、クエリ文字列に OAuth パラメーターを実装できるようになりました。
サービスビルダーからの関連コードは次のとおりです。
/**
* Configures the signature type, choose between header, querystring, etc. Defaults to Header
*
* @param scope The OAuth scope
* @return the {@link ServiceBuilder} instance for method chaining
*/
public ServiceBuilder signatureType(SignatureType type)
{
Preconditions.checkNotNull(type, "Signature type can't be null");
this.signatureType = type;
return this;
}
Service = new ServiceBuilder()
.provider(FreelancerApi.class)
.apiKey(consumer)
.apiSecret(secret)
.callback("oob")
.signatureType(SignatureType.QueryString)
.build();