Esempio n. 1
0
        public bool HasClaim(string claimType, string value)
        {
            var           principal     = Container.Resolve <IPrincipalBase>();
            HttpPrincipal httpPrincipal = principal as HttpPrincipal;

            if (httpPrincipal == null)
            {
                return(false);
            }
            return(httpPrincipal.HasClaim(claimType, value));
        }
Esempio n. 2
0
        public string GetClaim(string claimType)
        {
            var           principal     = Container.Resolve <IPrincipalBase>();
            HttpPrincipal httpPrincipal = principal as HttpPrincipal;

            if (httpPrincipal == null)
            {
                return(null);
            }
            return(httpPrincipal.GetClaim(claimType));
        }