annotate Agendas/trunk/src/Agendas.Web/Services/FormsAuthenticationService.cs @ 202:a731086c0b28

Se soluciona ticket 174. Además se agrega detalle del campo Hora y Duración cuando son obligatorios en Resources.
author alabra
date Sat, 20 Aug 2011 18:40:36 -0400
parents 65f0b3d70c18
children
rev   line source
93
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
1 using System;
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
2 using System.Web.Security;
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
3
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
4 namespace AltNetHispano.Agendas.Web.Services
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
5 {
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
6 public class FormsAuthenticationService : IFormsAuthenticationService
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
7 {
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
8 public void SignIn(string userName, bool createPersistentCookie)
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
9 {
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
10 if (String.IsNullOrEmpty(userName)) throw new ArgumentException("Value cannot be null or empty.", "userName");
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
11
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
12 FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
13 }
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
14
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
15 public void SignOut()
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
16 {
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
17 FormsAuthentication.SignOut();
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
18 }
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
19 }
65f0b3d70c18 Reordenando clases e interfaces
Nelo@Kenia.neluz.int
parents:
diff changeset
20 }