protected virtual async Task FillTenantId(IVQSessionService _vQSessionService, IEnumerable <Claim> claims, ResourceExecutingContext context) { var tenantKey = claims.FirstOrDefault(x => x.Type == CLAIM_TENANT_KEY)?.Value; if (string.IsNullOrWhiteSpace(tenantKey)) { throw new KeyNotFoundException(); } var id = await _tenantEntityRepository.GetIdByKey(tenantKey, context.HttpContext.RequestAborted); _vQSessionService.TenantId = id; }
protected virtual Task FillOtherData(IVQSessionService _vQSessionService, IEnumerable <Claim> claims, ResourceExecutingContext context) { return(Task.CompletedTask); }
public VQTenantIdentifierFilter(IVQSessionService vQSessionService, IVQRepositoryWithoutTenant <T> tenantEntityRepository) { _vQSessionService = vQSessionService; _tenantEntityRepository = tenantEntityRepository; }
public VQRepository(DbContext dbContext, IVQSessionService sessionService) : base(dbContext) { _sessionService = sessionService; }