Esempio n. 1
0
        public static void RequestAuthentication(Membership membership, string connectName, HttpContextBase httpContext, string returnUrl)
        {
            var client = GetAuthClient(membership, connectName);

            OpenAuthSecurityManager manager = new OpenAuthSecurityManager(httpContext, client.GetOpenAuthClient(), new MembershipOpenAuthDataProvider());
            manager.RequestAuthentication(returnUrl);
            //client.RequestAuthentication(httpContext, new Uri(returnUrl));
        }
 /// <summary>
 /// Requests the authentication core.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="provider">The provider.</param>
 /// <param name="returnUrl">The return URL.</param>
 internal static void RequestAuthenticationCore(HttpContextBase context, string provider, string returnUrl)
 {
     IAuthenticationClient client = GetOAuthClient(provider);
     var securityManager = new OpenAuthSecurityManager(context, client, OAuthDataProvider);
     securityManager.RequestAuthentication(returnUrl);
 }
 public void RequestAuthentication(IAuthenticationClient client, IOpenAuthDataProvider provider, string returnUrl)
 {
     var securityManager = new OpenAuthSecurityManager(
         new HttpContextWrapper(HttpContext.Current), client, provider);
     securityManager.RequestAuthentication(returnUrl);
 }