【发布时间】:2014-06-07 20:23:45
【问题描述】:
我有:
var service = new ServiceProviderDescription
{
RequestTokenEndpoint = new MessageReceivingEndpoint( this._requestTokenUrl, this._requestTokenHttpDeliveryMethod ),
UserAuthorizationEndpoint = new MessageReceivingEndpoint( this._authorizeUrl, HttpDeliveryMethods.GetRequest ),
AccessTokenEndpoint = new MessageReceivingEndpoint( this._accessTokenUrl, this._accessTokenHttpDeliveryMethod ),
TamperProtectionElements = new ITamperProtectionChannelBindingElement[] { new HmacSha1SigningBindingElement() },
ProtocolVersion = ProtocolVersion.V10a,
};
this._tokenManager = new InMemoryTokenManager();
this._tokenManager.ConsumerKey = this._consumerKey;
this._tokenManager.ConsumerSecret = this._consumerSecretKey;
this._consumer = new DesktopConsumer( service, this._tokenManager );
this._accessToken = string.Empty;
consumer.RequestUserAuthorization( null, null, out this.requestToken );
当 _requestTokenUrl 等于例如 127.0.0.1:1234/magento - 方法抛出异常,因为服务器返回:401 oauth_problem=signature_invalid
但如果我使用 127.0.0.1/magento,它可以正常工作。
如何将 RequestUserAuthorization() 与包含端口的 URL 一起使用?
【问题讨论】:
标签: magento url port dotnetopenauth magento-1.8