Update packages, use explicit type, use Microsoft OpenApi package
This commit is contained in:
@@ -47,14 +47,14 @@ public sealed class UserAccessor
|
||||
|
||||
private string GetClaimValue(string claimType)
|
||||
{
|
||||
var httpContext = _httpContextAccessor.HttpContext;
|
||||
HttpContext? httpContext = _httpContextAccessor.HttpContext;
|
||||
|
||||
if (httpContext is null)
|
||||
{
|
||||
ThrowForMissingHttpContext();
|
||||
}
|
||||
|
||||
var claimValue = httpContext.User.FindFirstValue(claimType);
|
||||
string? claimValue = httpContext.User.FindFirstValue(claimType);
|
||||
|
||||
if (string.IsNullOrWhiteSpace(claimValue))
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user