Exemple #1
0
 public JwtSecurityContextFactory(
     ICallContextFactory callContextFactory, ILoopbackIpFilter loopbackIpFilter, IJwtTokenReader jwtTokenReader)
 {
     _callContextFactory = callContextFactory.ThrowIfNull(nameof(callContextFactory));
     _loopbackIpFilter   = loopbackIpFilter.ThrowIfNull(nameof(loopbackIpFilter));
     _jwtTokenReader     = jwtTokenReader.ThrowIfNull(nameof(jwtTokenReader));
 }
Exemple #2
0
        /// <summary>
        /// Инициализирует отправителя сообщений с определенным адаптером очереди <see cref="IMessageAdapter"/>
        /// </summary>
        /// <param name="adapter">Адаптер сообщений <see cref="IMessageAdapter"/></param>
        /// <param name="callContextFactory">Провайдер контекста вызова</param>
        /// <param name="applicationName">Имя приложения</param>
        public MessageSender(IMessageAdapter adapter, ICallContextFactory callContextFactory, string applicationName)
        {
            _adapter            = adapter.ThrowIfNull(nameof(adapter));
            _callContextFactory = callContextFactory.ThrowIfNull(nameof(callContextFactory));

            _applicationName = applicationName;
        }
Exemple #3
0
 public NtlmSecurityContextFactory(IHttpContextAccessor httpContextAccessor,
                                   IHttpClientFactory httpClientFactory,
                                   ILoopbackIpFilter loopbackIpFilter,
                                   ICallContextFactory callContextFactory)
 {
     _httpContextAccessor = httpContextAccessor.ThrowIfNull(nameof(httpContextAccessor));
     _httpClientFactory   = httpClientFactory.ThrowIfNull(nameof(httpClientFactory));
     _loopbackIpFilter    = loopbackIpFilter.ThrowIfNull(nameof(loopbackIpFilter));
     _callContextFactory  = callContextFactory.ThrowIfNull(nameof(callContextFactory));
 }
 /// <summary>
 ///   Инициализирует компонент ссылками на <see cref="IConfiguration" />,
 ///   <see cref="IMessageAdapterFactory" />,
 ///   коллекции элементов <see cref="IMessageSerializer" /> и <see cref="IMessageDeserializer" />>
 /// </summary>
 /// <param name="configuration">Провайдер конфигурации</param>
 /// <param name="adapterFactory">Фабрика адаптеров для очередей</param>
 /// <param name="serializers">Коллекция сериализаторов</param>
 /// <param name="deserializers">Коллекция десериализаторов</param>
 public MessagingComponentFactory(
     IConfiguration configuration, IMessageAdapterFactory adapterFactory, IReadOnlyCollection <IMessageSerializer> serializers,
     IReadOnlyCollection <IMessageDeserializer> deserializers, ICallContextFactory callContextFactory)
 {
     _adapterFactory     = adapterFactory.ThrowIfNull(nameof(adapterFactory));
     _serializers        = serializers.ThrowIfNull(nameof(serializers));
     _deserializers      = deserializers.ThrowIfNull(nameof(deserializers));
     _callContextFactory = callContextFactory.ThrowIfNull(nameof(callContextFactory));
     _connectionOptions  = configuration.ThrowIfNull(nameof(configuration))
                           .GetSection("messaging")
                           .Get <MessagingConfiguration>();
 }
 public RequestAuthorizationHeaderHandler(ICallContextFactory callContextFactory)
 {
     _callContextFactory = callContextFactory.ThrowIfNull(nameof(callContextFactory));
 }
Exemple #6
0
 public BaseCompanyRequestHeadersHandler(ICallContextFactory callContextFactory)
 {
     _callContextFactory = callContextFactory.ThrowIfNull(nameof(callContextFactory));
 }