public async Task <IActionResult> Index() { var localAddresses = new string[] { "127.0.0.1", "::1", HttpContext.Connection.LocalIpAddress.ToString() }; if (!localAddresses.Contains(HttpContext.Connection.RemoteIpAddress.ToString())) { return(NotFound()); } var model = new DiagnosticsViewModel(await HttpContext.AuthenticateAsync()); return(View(model)); }
public async Task <IActionResult> Index() { var localAddresses = new string[] { "127.0.0.1", "::1", HttpContext.Connection.LocalIpAddress.ToString() }; if (!localAddresses.Contains(HttpContext.Connection.RemoteIpAddress.ToString())) { return(NotFound()); } var model = new DiagnosticsViewModel(await HttpContext.AuthenticateAsync()); // model.AuthenticateResult.Principal.Claims.add(new Claim(ClaimTypes.Role, "administrator")); return(View(model)); }
public async Task <IActionResult> Index() { var model = new DiagnosticsViewModel(await HttpContext.AuthenticateAsync()); return(View(model)); }