93
|
1 using System;
|
|
2 using System.Web.Security;
|
|
3
|
|
4 namespace AltNetHispano.Agendas.Web.Services
|
|
5 {
|
|
6 public class FormsAuthenticationService : IFormsAuthenticationService
|
|
7 {
|
|
8 public void SignIn(string userName, bool createPersistentCookie)
|
|
9 {
|
|
10 if (String.IsNullOrEmpty(userName)) throw new ArgumentException("Value cannot be null or empty.", "userName");
|
|
11
|
|
12 FormsAuthentication.SetAuthCookie(userName, createPersistentCookie);
|
|
13 }
|
|
14
|
|
15 public void SignOut()
|
|
16 {
|
|
17 FormsAuthentication.SignOut();
|
|
18 }
|
|
19 }
|
|
20 } |