Example #1
0
        public static ViewClaims GetAll(ClaimsPrincipal principal)
        {
            var claims = new List <ViewClaim>(
                from c in principal.Claims
                select new ViewClaim {
                Type  = c.Type,
                Value = c.Value
            });

            var vc = new ViewClaims();

            vc.AddRange(claims);

            return(vc);
        }
        public ViewClaims Get()
        {
            var principal = Request.GetClaimsPrincipal();

            return(ViewClaims.GetAll(principal));
        }