public PersonalizationData GetPersonalizationData() { var user = this.RequestContext.Principal; var persData = new PersonalizationData { Features = GetFeatures(user).ToList(), UiClaims = new UiClaimsData { UserName = user.Identity.Name, Capabilities = GetCapabilities(user), Constraints = GetConstraints(user), NameValueClaims = GetNameValueClaims(user) } }; return persData; }
/// <summary> /// Get application personalization information based on the incoming user. /// </summary> /// <returns></returns> public PersonalizationData GetPersonalizationData() { var user = RequestContext.Principal as ClaimsPrincipal; string userName = user.FindFirst("sub").Value; var persData = new PersonalizationData { Features = GetFeatures(userName).ToList(), UiClaims = new UiClaimsData { UserName = userName, Capabilities = GetCapabilities(userName), Constraints = GetConstraints(userName), NameValueClaims = GetNameValueClaims(userName) } }; return persData; }