Ejemplo n.º 1
0
 private static bool SetPrincipal(ICslaIdentity identity)
 {
     if (identity.IsAuthenticated)
     {
         PTPrincipal principal = new PTPrincipal(identity);
         Csla.ApplicationContext.User = principal;
     }
     OnNewUser();
     return(identity.IsAuthenticated);
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Creates an instance of the object, initializing a role
        /// claim for each role in the identity's Roles collection.
        /// </summary>
        /// <param name="identity">Identity object for the user.</param>
        public CslaClaimsPrincipal(ICslaIdentity identity)
            : base(identity)
        {
            var baseidentity = (ClaimsIdentity)base.Identity;

            foreach (var item in identity.Roles)
            {
                baseidentity.AddClaim(new Claim("http://schemas.microsoft.com/ws/2008/06/identity/claims/role", item));
            }
        }
Ejemplo n.º 3
0
 protected PTPrincipal(ICslaIdentity identity)
     : base(identity)
 {
 }
 public CustomPrincipal(ICslaIdentity identity)
     : base(identity)
 {
 }
Ejemplo n.º 5
0
 public CustomPrincipal(ICslaIdentity identity)
     : base(identity)
 {
 }
Ejemplo n.º 6
0
        private Principal(ICslaIdentity identity)
            : base(identity)
        {

        }