Mercurial > altnet-hispano
diff Agendas/trunk/src/Agendas.Web/Services/FormsAuthenticationService.cs @ 93:65f0b3d70c18
Reordenando clases e interfaces
author | Nelo@Kenia.neluz.int |
---|---|
date | Sat, 04 Jun 2011 00:07:20 -0300 |
parents | |
children |
line wrap: on
line diff
--- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/Agendas/trunk/src/Agendas.Web/Services/FormsAuthenticationService.cs Sat Jun 04 00:07:20 2011 -0300 @@ -0,0 +1,20 @@ +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(); + } + } +} \ No newline at end of file