Ejemplo n.º 1
0
        public static void Logout()
        {
            Csla.Security.CslaIdentity identity  = RolodexIdentity.UnauthenticatedIdentity();
            RolodexPrincipal           principal = new RolodexPrincipal(identity);

            Csla.ApplicationContext.User = principal;
        }
Ejemplo n.º 2
0
 public static void Login(string username, string password, EventHandler <DataPortalResult <RolodexIdentity> > completed)
 {
     RolodexIdentity.GetIdentity(username, password, (o, e) =>
     {
         if (e.Object == null)
         {
             SetPrincipal(RolodexIdentity.UnauthenticatedIdentity());
         }
         else
         {
             SetPrincipal(e.Object);
         }
         completed(e.Object, e);
     });
 }