我们将DotNetOpenAuth用于TokenProvider和Client应用程序。 我们使用的是DotNetOpenAuth版本4.3.4。 我们正在使用OAuth 1.0版
客户端应用程序向https://myTokenProvider/GetRequestToken发出请求并收到500内部服务器错误。
我转到TokenProvider上的日志,我在日志中收到以下消息:
2015-03-27 23:04:06,395(GMT-4)[9] INFO DotNetOpenAuth.Messaging.Channel - 扫描传入的消息请求:http://myTokenProvider/GetRequestToken
2015-03-27 23:04:06,395(GMT-4)[9] DEBUG DotNetOpenAuth.Messaging.Channel - 收到的传入请求:UnauthorizedTokenRequest
2015-03-27 23:04:06,395(GMT-4)[9] INFO DotNetOpenAuth.Messaging.Channel - 处理传入的UnauthorizedTokenRequest(1.0.1)消息:
oauth_callback:https://myClientApplication/Account/Login?returnUrl=https%3a%2f%2fmyClientApplication%2fhome%2f
oauth_consumer_key:myKeyHere
oauth_nonce:HhdkQHQX
oauth_signature_method:HMAC-SHA1
oauth_signature:e7q4Sc10Ju / 6mEED3vHSEMwVewo =
oauth_version:1.0
oauth_timestamp:1427511846
2015-03-27 23:04:06,395(GMT-4)[9] DEBUG DotNetOpenAuth.Messaging.Bindings - 验证传入的UnauthorizedTokenRequest消息签名:e7q4Sc10Ju / 6mEED3vHSEMwVewo =
2015-03-27 23:04:06,395(GMT-4)[9] DEBUG DotNetOpenAuth.Messaging.Channel - 将信息应用于邮件以准备签名或签名验证。
2015-03-27 23:04:06,411(GMT-4)[9] DEBUG DotNetOpenAuth.Messaging.Bindings - 构造的签名基本字符串:POST& http%3A%2F%2FmyTokenProvider%2FGetRequestToken& oauth_callback%3Dhttps%253A %252F%252FmyClientApplication%252FAccount%252FLogin%253FreturnUrl%253Dhttps%25253a%25252f%25252fmyClientApplication%25252f%2526returned%253Dtrue%26oauth_consumer_key%3DmyKeyHere%26oauth_nonce%3DHhdkQHQX%26oauth_signature_method%3DHMAC-SHA1%26oauth_timestamp%3D1427511846%26oauth_version%3D1.0
2015-03-27 23:04:06,411(GMT-4)[9]错误DotNetOpenAuth.Messaging.Bindings - 签名验证失败。
2015-03-27 23:04:06,411(GMT-4)[9] ERROR HandleErrorWithLoggingAttribute - 托管应用程序错误
DotNetOpenAuth.Messaging.Bindings.InvalidSignatureException:邮件签名不正确。
at DotNetOpenAuth.OAuth.ChannelElements.SigningBindingElementBase.ProcessIncomingMessage(IProtocolMessage message)
at DotNetOpenAuth.OAuth.ChannelElements.SigningBindingElementChain.ProcessIncomingMessage(IProtocolMessage message)
在DotNetOpenAuth.Messaging.Channel.ProcessIncomingMessage(IProtocolMessage消息)
在DotNetOpenAuth.Messaging.Channel.ReadFromRequest(HttpRequestBase httpRequest)
在OAuthManager.GetAuthorizationToken(String oauthUri)
在Controllers.AccountController.GetRequestToken()
在lambda_method(Closure,ControllerBase,Object [])
在System.Web.Mvc.ReflectedActionDescriptor.Execute(ControllerContext controllerContext,IDictionary`2参数)
在System.Web.Mvc.ControllerActionInvoker.InvokeActionMethod(ControllerContext controllerContext,ActionDescriptor actionDescriptor,IDictionary`2参数)
在System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass42.b__41()
at System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass37。<> c__DisplayClass39.b__33()
在System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass4f.b__49()
在System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass4f.b__49()
在System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass37.b__36(IAsyncResult asyncResult)
at System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass25。<> c__DisplayClass2a.b__20()
at System.Web.Mvc.Async.AsyncControllerActionInvoker。<> c__DisplayClass25.b__22(IAsyncResult asyncResult)>
有人可以帮我弄清楚签名验证失败的原因吗?
这是以前的工作,现在不是。我无法弄清楚发生了什么变化,或者为什么它停止了工作。
谢谢!