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

            Csla.ApplicationContext.User = principal;
        }
Beispiel #2
0
 private static void SetPrincipal(Csla.Security.CslaIdentity identity)
 {
     if (identity != null && identity.IsAuthenticated)
     {
         Csla.ApplicationContext.User = new SLPrincipal(identity);
     }
     else
     {
         Csla.ApplicationContext.User = new Csla.Security.UnauthenticatedPrincipal();
     }
 }
Beispiel #3
0
 private static bool SetPrincipal(Csla.Security.CslaIdentity identity)
 {
     if (identity.IsAuthenticated)
     {
         SLPrincipal principal = new SLPrincipal(identity);
         Csla.ApplicationContext.User = principal;
     }
     else
     {
         identity = SLIdentity.UnauthenticatedIdentity();
         SLPrincipal principal = new SLPrincipal(identity);
         Csla.ApplicationContext.User = principal;
     }
     return(identity.IsAuthenticated);
 }