public DeviceCodeBackChannelController( IExternalServicesStore externalServicesStore, IOptions <TokenExchangeOptions> tokenExchangeOptions, IIdentityTokenValidator identityTokenValidator, IConsentExternalService consentExternalService, IConsentDiscoveryCacheAccessor consentDiscoveryCacheAccessor, IClientSecretValidator clientValidator, IDeviceFlowStore deviceFlowStore, ISerializer serializer, ICoreMapperAccessor coreMapperAccessor, IEventService events, ILogger <DeviceCodeBackChannelController> logger) { _externalServicesStore = externalServicesStore; _tokenExchangeOptions = tokenExchangeOptions.Value; _identityTokenValidator = identityTokenValidator; _consentExternalService = consentExternalService; _consentDiscoveryCacheAccessor = consentDiscoveryCacheAccessor; _clientValidator = clientValidator; _deviceFlowStore = deviceFlowStore; _serializer = serializer; _coreMapperAccessor = coreMapperAccessor; _events = events; _logger = logger; }
/// <summary> /// Initializes a new instance of the <see cref="DeviceFlowStore"/> class. /// </summary> /// <param name="context">The context.</param> /// <param name="serializer">The serializer</param> /// <param name="logger">The logger.</param> public EntityFrameworkDeviceFlowStoreExtra( IScopedContext <TenantRequestContext> scopedTenantRequestContext, ITenantAwareConfigurationDbContextAccessor tenantAwareConfigurationDbContextAccessor, IPersistentGrantSerializer serializer, ICoreMapperAccessor coreMapperAccessor, ILogger <EntityFrameworkDeviceFlowStoreExtra> logger) { _scopedTenantRequestContext = scopedTenantRequestContext; _tenantAwareConfigurationDbContextAccessor = tenantAwareConfigurationDbContextAccessor; var tenant = _scopedTenantRequestContext.Context.TenantName; Context = _tenantAwareConfigurationDbContextAccessor.GetTenantAwareConfigurationDbContext(tenant); Serializer = serializer; _coreMapperAccessor = coreMapperAccessor; Logger = logger; }
public InMemoryTenantAwarePersistedGrantStore( IScopedStorage scopedStorage, IScopedContext <TenantRequestContext> scopedTenantRequestContext, ICoreMapperAccessor coreMapperAccessor) { _scopedStorage = scopedStorage; _scopedTenantRequestContext = scopedTenantRequestContext; _coreMapperAccessor = coreMapperAccessor; if (!string.IsNullOrWhiteSpace(_scopedTenantRequestContext.Context.TenantName)) { if (!_tenantStores.ContainsKey(_scopedTenantRequestContext.Context.TenantName)) { _tenantStores.TryAdd(_scopedTenantRequestContext.Context.TenantName, new InMemoryPersistedGrantStore()); } _tenantStores.TryGetValue(_scopedTenantRequestContext.Context.TenantName, out _innerPersistedGrantStore); } }