diff Agendas/trunk/src/Agendas.Web/Controllers/PerfilController.cs @ 142:62dc9fb3a03e

Quitando cuentas BuiltIn
author Nelo@Guinea.neluz.int
date Mon, 01 Aug 2011 00:28:04 -0300
parents 7a2eeb9e9bf9
children 97e51ddeeb58
line wrap: on
line diff
--- a/Agendas/trunk/src/Agendas.Web/Controllers/PerfilController.cs	Mon Aug 01 00:10:20 2011 -0300
+++ b/Agendas/trunk/src/Agendas.Web/Controllers/PerfilController.cs	Mon Aug 01 00:28:04 2011 -0300
@@ -1,31 +1,15 @@
 using System;
 using System.Linq;
 using System.Web.Mvc;
-using System.Web.Routing;
 using AltNetHispano.Agendas.Domain;
 using AltNetHispano.Agendas.Factories;
 using AltNetHispano.Agendas.Twitter;
 using AltNetHispano.Agendas.Web.Models;
-using AltNetHispano.Agendas.Web.Services;
 
 namespace AltNetHispano.Agendas.Web.Controllers
 {
     public class PerfilController : Controller
     {
-		public IMembershipService MembershipService { get; set; }
-
-		protected override void Initialize(RequestContext requestContext)
-		{
-			//if (FormsService == null) { FormsService = new FormsAuthenticationService(); }
-			if (MembershipService == null)
-				MembershipService = new AccountMembershipService();
-
-			base.Initialize(requestContext);
-		}
-
-		//
-        // GET: /Perfil/
-
         public ActionResult Index()
         {
         	var persona = IdentityContext.GetUsuario();
@@ -48,7 +32,12 @@
         	return View(model);
         }
 
-		public ActionResult AddTwitterAccount()
+        public ActionResult AddGoogleAccount()
+        {
+            throw new NotImplementedException();
+        }
+
+        public ActionResult AddTwitterAccount()
 		{
 			var oAuth = new OAuthTwitter();
 
@@ -74,29 +63,6 @@
 			return RedirectToAction("Index");
 		}
 
-		public ActionResult AddBuiltInAccount()
-		{
-			return View();
-		}
-
-		[HttpPost]
-		public ActionResult AddBuiltInAccount(LogOnModel model)
-		{
-			if (ModelState.IsValid)
-			{
-				if (MembershipService.ValidateUser(model.UserName, model.Password))
-				{
-					var personaService = AgendaFactory.GetPersonaService();
-					personaService.AddCuenta(IdentityProviderEnum.BuiltIn, model.UserName);
-					return RedirectToAction("Index");
-				}
-				ModelState.AddModelError("", "The user name or password provided is incorrect.");
-			}
-
-			// If we got this far, something failed, redisplay form
-			return View(model);
-		}
-
 		public ActionResult Remove(string identityProvider, string username)
 		{
 			var personaService = AgendaFactory.GetPersonaService();