コード例 #1
0
 public static bool Login(string username, string password)
 {
   WaldenIdentity identity = 
     WaldenIdentity.GetIdentity(username, password);
   if (identity.IsAuthenticated)
   {
     WaldenPrincipal principal = new WaldenPrincipal(identity);
     Csla.ApplicationContext.User = principal;
   }
   return identity.IsAuthenticated;
 }
コード例 #2
0
 public static void Logout()
 {
   WaldenIdentity identity = WaldenIdentity.UnauthenticatedIdentity();
   WaldenPrincipal principal = new WaldenPrincipal(identity);
   Csla.ApplicationContext.User = principal;
 }