Exemplo n.º 1
0
 public SoapEndpointMiddleware(ILogger <SoapEndpointMiddleware> logger, RequestDelegate next, Type serviceType, string path, MessageEncoder encoder, SoapSerializer serializer, bool caseInsensitivePath)
 {
     _logger                 = logger;
     _next                   = next;
     _endpointPath           = path;
     _messageEncoder         = encoder;
     _serializer             = serializer;
     _pathComparisonStrategy = caseInsensitivePath ? StringComparison.OrdinalIgnoreCase : StringComparison.Ordinal;
     _service                = new ServiceDescription(serviceType);
     _authenticationChecker  = new AuthenticationChecker();
 }
        public TrendyolWebApiBuilder WithBasicAuth(IAuthenticationChecker authenticationChecker, IUserStore userStore)
        {
            _appBuilder.BeforeBuild(() =>
            {
                HttpConfiguration config = _appBuilder.DataStore.GetData<HttpConfiguration>(Constants.HttpConfigurationDataKey);

                BasicAuthenticationFilter basicAuthenticationFilter = new BasicAuthenticationFilter(authenticationChecker, userStore);
                config.Filters.Add(basicAuthenticationFilter);

                config.SuppressHostPrincipal();
            });

            return this;
        }
 public BasicAuthenticationFilter(IAuthenticationChecker checker, IUserStore userStore)
 {
     _checker   = checker;
     _userStore = userStore;
 }
Exemplo n.º 4
0
 public RequestProcessor(ISiteLockConfiguration config, IAuthenticationChecker authenticationChecker)
 {
     _config      = config;
     _authChecker = authenticationChecker;
 }