I have the following method:
protected override Task<HttpResponseMessage> SendAsync(HttpRequestMessage request, CancellationToken cancellationToken) { if (Composite.C1Console.Security.UserValidationFacade.IsLoggedIn()) SetPrincipal(request, new ClaimsPrincipal(new ClaimsIdentity(new Claim[] { new Claim(ClaimTypes.Role, "Administrator") },))); var test = request.GetClaimsPrincipal(); return base.SendAsync(request, cancellationToken); }
My problem is that if I check that the test.Identity.IsAuthenticated is parameter is not set to true. This is just some test code to figure out how to do this. What am I missing.
source share