public async Task <bool> IsAuthorizedAsync(Guid sessionId, MemorySingletonProxyConfigProvider.Route route) { ProxyAppSettings proxyAppSetting = await _authDbContext.ProxyAppSettings .AsNoTracking() .Where( p => p.AuthApp.UserGroups.Any( u => u.Members.Any( m => m.Sessions.Any( s => s.Id == sessionId && s.ExpiredTime == null && m.IsDisabled == false ) ) ) ) .SingleOrDefaultAsync(p => p.Id == route.ProxySettingId); if (proxyAppSetting == null) { return(false); } return(true); }
public RequestTransformer(MemorySingletonProxyConfigProvider.Route route) { _route = route; }