Reputation: 4637
I'm implementing an OAuth2Client and when I call
var result = OAuthWebSecurity.VerifyAuthentication();
I result.IsSuccessful is equals to false. I've seen that "OAuthWebSecurity.IsAuthenticatedWithOAuth" method has the following exception:
'Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.IsAuthenticatedWithOAuth' threw an exception of type 'System.MissingMethodException' "Method not found: 'Void DotNetOpenAuth.AspNet.OpenAuthSecurityManager..ctor(System.Web.HttpContextBase)'." " at Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.GetIsAuthenticatedWithOAuthCore(HttpContextBase context)\r\n at Microsoft.Web.WebPages.OAuth.OAuthWebSecurity.get_IsAuthenticatedWithOAuth()"
Why?
Upvotes: 1
Views: 2249
Reputation: 4637
I'm going with an workaround... In my scenario I have only one OAuth Client, so if I cast it to my client I can verify authentication.
var result = ((MyOAuth2Client)OAuthWebSecurity.GetOAuthClientData("my")
.AuthenticationClient).VerifyAuthentication(HttpContext, Request.Url);
Upvotes: 1
Reputation: 81801
It looks like it's because of this change. I've opened an issue to track and fix this.
For now, if you install the 4.0.4.12182 version of DotNetOpenAuth.AspNet, it should correct the problem (it was before the regression was introduced).
Upvotes: 2