Custom OAuth client in MVC4 / DotNetOpenAuth - missing access token secret

后端 未结 4 2094
花落未央
花落未央 2020-12-30 16:31

I\'m currently working on implementing a Dropbox OAuth client for my application. It\'s been a fairly painless process until I hit the end. Once I\'ve authorized, when I att

4条回答
  •  失恋的感觉
    2020-12-30 16:56

    The reason that OAuthClient class doesn't include access token secret is that it's normally not needed for authentication purpose, which is the primary purpose of the ASP.NET OAuth library.

    That said, if you want to retrieve the access token secret in your case, you can override the VerifyAuthentication() method, instead of VerifyAuthenticationCore() like you are doing above. Inside VerifyAuthentication(), you can call WebWorker.ProcessUserAuthorization() to validation the login and from the returned AuthorizedTokenResponse object, you have access to the token secret.

提交回复
热议问题