mirror of
https://github.com/farcasclaudiu/AzureStaticWebApp-CSharp-SimpleDemo.git
synced 2026-06-22 07:01:03 +03:00
Fix auth logic
Fix auth logic
This commit is contained in:
+2
-2
@@ -23,7 +23,7 @@ namespace demo.Function
|
|||||||
|
|
||||||
bool isClaimValid = true;
|
bool isClaimValid = true;
|
||||||
|
|
||||||
if (principal == null && !principal.Identity.IsAuthenticated)
|
if (principal == null || !principal.Identity.IsAuthenticated)
|
||||||
{
|
{
|
||||||
log.LogWarning("Request was not authenticated.");
|
log.LogWarning("Request was not authenticated.");
|
||||||
isClaimValid = false;
|
isClaimValid = false;
|
||||||
@@ -42,4 +42,4 @@ namespace demo.Function
|
|||||||
return new OkObjectResult(responseMessage);
|
return new OkObjectResult(responseMessage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user