view Agendas/trunk/src/Agendas.Web/Services/FormsAuthenticationService.cs @ 117:7ef7e4bb71f6

manejo de mensajes al usuario
author Nelo@Kenia.neluz.int
date Sun, 19 Jun 2011 13:35:34 -0300
parents 65f0b3d70c18
children
line wrap: on
line source

using System;
using System.Web.Security;

namespace AltNetHispano.Agendas.Web.Services
{
	public class FormsAuthenticationService : IFormsAuthenticationService
	{
		public void SignIn(string userName, bool createPersistentCookie)
		{
			if (String.IsNullOrEmpty(userName)) throw new ArgumentException("Value cannot be null or empty.", "userName");

			FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);
		}

		public void SignOut()
		{
			FormsAuthentication.SignOut();
		}
	}
}