DESCRIPTION
It would be good if it could support mocks for IS4
so that code samples below could work
if (!context.User.Identity.IsAuthenticated) { throw new ArgumentException(nameof(context)); }
OR
public long GetCurrentEmployeeId() { var claims = httpContextAdapter.GetUserClaims(); var employeeId = claims.FirstOrDefault(x => x.Type == ClaimConstants.EmployeeId); if (employeeId == null) { throw new ArgumentException(string.Format(ExceptionConstants.EmptyValueInToken, JwtClaimTypes.Subject)); } var result = employeeId.Value.ToIntOrThrow(); return result; }
ADDITIONAL CONTEXT
POC in GITLAB