annotate Agendas/trunk/src/Agendas.Web/Services/FormsAuthenticationService.cs @ 191:03c237cd5cc4

Test que verifica el acceso por shorten url
author nelopauselli
date Tue, 09 Aug 2011 09:52:02 -0300
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 }