diff --git a/api/HelloYou.cs b/api/HelloYou.cs index 918f801..c0d59f2 100644 --- a/api/HelloYou.cs +++ b/api/HelloYou.cs @@ -20,7 +20,15 @@ namespace demo.Function ClaimsPrincipal principal) { log.LogInformation("C# HTTP trigger function processed a request."); - + + bool isClaimValid = true; + + if (principal == null && !principal.Identity.IsAuthenticated) + { + log.LogWarning("Request was not authenticated."); + isClaimValid = false; + } + string name = req.Query["name"]; string requestBody = await new StreamReader(req.Body).ReadToEndAsync(); diff --git a/app/Pages/Secured.razor b/app/Pages/Secured.razor index 7b96e69..c96efd9 100644 --- a/app/Pages/Secured.razor +++ b/app/Pages/Secured.razor @@ -7,7 +7,6 @@