Ejemplo n.º 1
0
        private string GetClaimsForUser(HttpActionContext actionContext)
        {
            var repository = (IRepository <User>)actionContext.Request.GetDependencyScope().GetService(typeof(IRepository <User>));

            var loggedInUser = new ExtractLoggedInUser(actionContext.Request.GetOwinContext().Authentication.User, repository)
                               .Do();

            return(loggedInUser.NotAny() || loggedInUser.Single().Claims.IsNullOrWhiteSpace()
                ? ""
                : loggedInUser.Single().Claims);
        }