Stuck using Microsoft.Web.WebPages.OAuth.OAuthWebSecurity in an MVC application

Tthmrclffotna

New Member
I just don't understand some code in the \[code\]Microsoft.Web.WebPages.OAuth\[/code\] namespace, specifically the OAuthWebSecurity class.It's this method here :-\[code\]internal static void RequestAuthenticationCore(HttpContextBase context, string provider, string returnUrl){ IAuthenticationClient client = GetOAuthClient(provider); var securityManager = new OpenAuthSecurityManager(context, client, OAuthDataProvider); securityManager.RequestAuthentication(returnUrl);}\[/code\]The first line is fine => grab the provider data, for this authentication request. Lets pretend this is a \[code\]TwitterClient(..)\[/code\].Now, we need to create a \[code\]SecurityManager\[/code\] class .. which accepts three args. What is that 3rd arg? An \[code\]OAuthDataProvider\[/code\]? That's defined as a static, here:\[code\]internal static IOpenAuthDataProvider OAuthDataProvider = new WebPagesOAuthDataProvider();\[/code\]And this creates a \[code\]WebPagesOAuthDataProvider\[/code\]. This is my problem. What is this? And why does it have to be tightly coupled to an \[code\]ExtendedMembershipProvider\[/code\]? What is an \[code\]ExtendedMembershipProvider\[/code\]? Why is this needed? In my web application I'm trying to use a RavenDb database and my own custom principal and custom identity. Nothing to do with Membership or SimpleMembership that comes with ASP.NET.Could someone please help me out here? What is that class and why is it used, etc? What's it's purpose? Is this something that DNOA requires? and why?(I'm also secretly hoping Andrew Arnott will see this Q and help me out).
 
Back
Top