Beispiel #1
0
        public static void Logout()
        {
            Csla.Security.CslaIdentity identity  = BusinessIdentity.UnauthenticatedIdentity();
            BusinessPrincipal          principal = new BusinessPrincipal(identity);

            Csla.ApplicationContext.User = principal;
        }
Beispiel #2
0
 public static void Login(string username, string password, string roles, EventHandler <EventArgs> completed)
 {
     BusinessIdentity.GetIdentity(username, password, roles, (o, e) =>
     {
         if (e.Object == null)
         {
             SetPrincipal(BusinessIdentity.UnauthenticatedIdentity());
         }
         else
         {
             SetPrincipal(e.Object);
         }
         completed(null, EventArgs.Empty);
     });
 }