mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-04-22 06:22:50 +08:00
removed library namespace
This commit is contained in:
parent
acfeeed86a
commit
8b0ceeda5b
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
|
||||||
namespace Ocelot.Library.Authentication.Handler
|
namespace Ocelot.Authentication.Handler
|
||||||
{
|
{
|
||||||
public class AuthenticationHandler
|
public class AuthenticationHandler
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using IdentityServer4.AccessTokenValidation;
|
using IdentityServer4.AccessTokenValidation;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.Authentication.Handler.Creator
|
namespace Ocelot.Authentication.Handler.Creator
|
||||||
{
|
{
|
||||||
using AuthenticationOptions = Configuration.AuthenticationOptions;
|
using AuthenticationOptions = Configuration.AuthenticationOptions;
|
||||||
|
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.Authentication.Handler.Creator
|
namespace Ocelot.Authentication.Handler.Creator
|
||||||
{
|
{
|
||||||
using AuthenticationOptions = Configuration.AuthenticationOptions;
|
using AuthenticationOptions = Configuration.AuthenticationOptions;
|
||||||
|
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Ocelot.Library.Authentication.Handler.Creator;
|
using Ocelot.Authentication.Handler.Creator;
|
||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.Authentication.Handler.Factory
|
namespace Ocelot.Authentication.Handler.Factory
|
||||||
{
|
{
|
||||||
using AuthenticationOptions = Configuration.AuthenticationOptions;
|
using AuthenticationOptions = Configuration.AuthenticationOptions;
|
||||||
|
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.Authentication.Handler.Factory
|
namespace Ocelot.Authentication.Handler.Factory
|
||||||
{
|
{
|
||||||
using AuthenticationOptions = Configuration.AuthenticationOptions;
|
using AuthenticationOptions = Configuration.AuthenticationOptions;
|
||||||
|
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
namespace Ocelot.Library.Authentication.Handler.Factory
|
namespace Ocelot.Authentication.Handler.Factory
|
||||||
{
|
{
|
||||||
public class UnableToCreateAuthenticationHandlerError : Error
|
public class UnableToCreateAuthenticationHandlerError : Error
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Ocelot.Library.Authentication.Handler
|
namespace Ocelot.Authentication.Handler
|
||||||
{
|
{
|
||||||
public enum SupportedAuthenticationProviders
|
public enum SupportedAuthenticationProviders
|
||||||
{
|
{
|
||||||
|
@ -2,14 +2,14 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.Authentication.Handler.Factory;
|
using Ocelot.Authentication.Handler.Factory;
|
||||||
using Ocelot.Library.Configuration;
|
using Ocelot.Configuration;
|
||||||
using Ocelot.Library.DownstreamRouteFinder;
|
using Ocelot.DownstreamRouteFinder;
|
||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
using Ocelot.Library.Middleware;
|
using Ocelot.Middleware;
|
||||||
using Ocelot.Library.ScopedData;
|
using Ocelot.ScopedData;
|
||||||
|
|
||||||
namespace Ocelot.Library.Authentication.Middleware
|
namespace Ocelot.Authentication.Middleware
|
||||||
{
|
{
|
||||||
public class AuthenticationMiddleware : OcelotMiddleware
|
public class AuthenticationMiddleware : OcelotMiddleware
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
|
||||||
namespace Ocelot.Library.Authentication.Middleware
|
namespace Ocelot.Authentication.Middleware
|
||||||
{
|
{
|
||||||
public static class AuthenticationMiddlewareMiddlewareExtensions
|
public static class AuthenticationMiddlewareMiddlewareExtensions
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
namespace Ocelot.Library.Configuration
|
using System.Collections.Generic;
|
||||||
{
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
namespace Ocelot.Configuration
|
||||||
|
{
|
||||||
public class AuthenticationOptions
|
public class AuthenticationOptions
|
||||||
{
|
{
|
||||||
public AuthenticationOptions(string provider, string providerRootUrl, string scopeName, bool requireHttps, List<string> additionalScopes, string scopeSecret)
|
public AuthenticationOptions(string provider, string providerRootUrl, string scopeName, bool requireHttps, List<string> additionalScopes, string scopeSecret)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Builder
|
namespace Ocelot.Configuration.Builder
|
||||||
{
|
{
|
||||||
public class ReRouteBuilder
|
public class ReRouteBuilder
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Ocelot.Library.Configuration
|
namespace Ocelot.Configuration
|
||||||
{
|
{
|
||||||
public class ClaimToHeader
|
public class ClaimToHeader
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Creator
|
namespace Ocelot.Configuration.Creator
|
||||||
{
|
{
|
||||||
public interface IOcelotConfigurationCreator
|
public interface IOcelotConfigurationCreator
|
||||||
{
|
{
|
||||||
|
@ -2,12 +2,12 @@ using System;
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Microsoft.Extensions.Options;
|
using Microsoft.Extensions.Options;
|
||||||
using Ocelot.Library.Configuration.Parser;
|
using Ocelot.Configuration.Parser;
|
||||||
using Ocelot.Library.Configuration.Validator;
|
using Ocelot.Configuration.Validator;
|
||||||
using Ocelot.Library.Configuration.Yaml;
|
using Ocelot.Configuration.Yaml;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Creator
|
namespace Ocelot.Configuration.Creator
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Register as singleton
|
/// Register as singleton
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
namespace Ocelot.Library.Configuration
|
|
||||||
{
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
|
namespace Ocelot.Configuration
|
||||||
|
{
|
||||||
public interface IOcelotConfiguration
|
public interface IOcelotConfiguration
|
||||||
{
|
{
|
||||||
List<ReRoute> ReRoutes { get; }
|
List<ReRoute> ReRoutes { get; }
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration
|
namespace Ocelot.Configuration
|
||||||
{
|
{
|
||||||
public class OcelotConfiguration : IOcelotConfiguration
|
public class OcelotConfiguration : IOcelotConfiguration
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
using Ocelot.Library.RequestBuilder;
|
using Ocelot.Responses;
|
||||||
using Ocelot.Library.Responses;
|
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Parser
|
namespace Ocelot.Configuration.Parser
|
||||||
{
|
{
|
||||||
public class ClaimToHeaderConfigurationParser : IClaimToHeaderConfigurationParser
|
public class ClaimToHeaderConfigurationParser : IClaimToHeaderConfigurationParser
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Parser
|
namespace Ocelot.Configuration.Parser
|
||||||
{
|
{
|
||||||
public interface IClaimToHeaderConfigurationParser
|
public interface IClaimToHeaderConfigurationParser
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Parser
|
namespace Ocelot.Configuration.Parser
|
||||||
{
|
{
|
||||||
public class InstructionNotForClaimsError : Error
|
public class InstructionNotForClaimsError : Error
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Parser
|
namespace Ocelot.Configuration.Parser
|
||||||
{
|
{
|
||||||
public class NoInstructionsError : Error
|
public class NoInstructionsError : Error
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System;
|
using System;
|
||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Parser
|
namespace Ocelot.Configuration.Parser
|
||||||
{
|
{
|
||||||
public class ParsingConfigurationHeaderError : Error
|
public class ParsingConfigurationHeaderError : Error
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Provider
|
namespace Ocelot.Configuration.Provider
|
||||||
{
|
{
|
||||||
public interface IOcelotConfigurationProvider
|
public interface IOcelotConfigurationProvider
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using Ocelot.Library.Configuration.Creator;
|
using Ocelot.Configuration.Creator;
|
||||||
using Ocelot.Library.Configuration.Repository;
|
using Ocelot.Configuration.Repository;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Provider
|
namespace Ocelot.Configuration.Provider
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Register as singleton
|
/// Register as singleton
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration
|
namespace Ocelot.Configuration
|
||||||
{
|
{
|
||||||
public class ReRoute
|
public class ReRoute
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Repository
|
namespace Ocelot.Configuration.Repository
|
||||||
{
|
{
|
||||||
public interface IOcelotConfigurationRepository
|
public interface IOcelotConfigurationRepository
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Repository
|
namespace Ocelot.Configuration.Repository
|
||||||
{
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Register as singleton
|
/// Register as singleton
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Validator
|
namespace Ocelot.Configuration.Validator
|
||||||
{
|
{
|
||||||
public class ConfigurationValidationResult
|
public class ConfigurationValidationResult
|
||||||
{
|
{
|
||||||
|
@ -1,13 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Ocelot.Library.Authentication;
|
using Ocelot.Authentication.Handler;
|
||||||
using Ocelot.Library.Authentication.Handler;
|
using Ocelot.Configuration.Yaml;
|
||||||
using Ocelot.Library.Configuration.Yaml;
|
using Ocelot.Errors;
|
||||||
using Ocelot.Library.Errors;
|
using Ocelot.Responses;
|
||||||
using Ocelot.Library.Responses;
|
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Validator
|
namespace Ocelot.Configuration.Validator
|
||||||
{
|
{
|
||||||
public class ConfigurationValidator : IConfigurationValidator
|
public class ConfigurationValidator : IConfigurationValidator
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Validator
|
namespace Ocelot.Configuration.Validator
|
||||||
{
|
{
|
||||||
public class DownstreamTemplateAlreadyUsedError : Error
|
public class DownstreamTemplateAlreadyUsedError : Error
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Ocelot.Library.Configuration.Yaml;
|
using Ocelot.Configuration.Yaml;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Validator
|
namespace Ocelot.Configuration.Validator
|
||||||
{
|
{
|
||||||
public interface IConfigurationValidator
|
public interface IConfigurationValidator
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
namespace Ocelot.Library.Configuration.Validator
|
namespace Ocelot.Configuration.Validator
|
||||||
{
|
{
|
||||||
public class UnsupportedAuthenticationProviderError : Error
|
public class UnsupportedAuthenticationProviderError : Error
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
namespace Ocelot.Library.Configuration.Yaml
|
using System.Collections.Generic;
|
||||||
{
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
namespace Ocelot.Configuration.Yaml
|
||||||
|
{
|
||||||
public class YamlAuthenticationOptions
|
public class YamlAuthenticationOptions
|
||||||
{
|
{
|
||||||
public string Provider { get; set; }
|
public string Provider { get; set; }
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
namespace Ocelot.Library.Configuration.Yaml
|
using System.Collections.Generic;
|
||||||
{
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
namespace Ocelot.Configuration.Yaml
|
||||||
|
{
|
||||||
public class YamlConfiguration
|
public class YamlConfiguration
|
||||||
{
|
{
|
||||||
public YamlConfiguration()
|
public YamlConfiguration()
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
namespace Ocelot.Library.Configuration.Yaml
|
using System.Collections.Generic;
|
||||||
{
|
|
||||||
using System.Collections.Generic;
|
|
||||||
|
|
||||||
|
namespace Ocelot.Configuration.Yaml
|
||||||
|
{
|
||||||
public class YamlReRoute
|
public class YamlReRoute
|
||||||
{
|
{
|
||||||
public YamlReRoute()
|
public YamlReRoute()
|
||||||
|
@ -1,31 +1,26 @@
|
|||||||
using Ocelot.Library.Authentication.Handler.Creator;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.Authentication.Handler.Factory;
|
|
||||||
using Ocelot.Library.Configuration.Creator;
|
|
||||||
using Ocelot.Library.Configuration.Parser;
|
|
||||||
using Ocelot.Library.Configuration.Provider;
|
|
||||||
using Ocelot.Library.Configuration.Repository;
|
|
||||||
using Ocelot.Library.Configuration.Validator;
|
|
||||||
using Ocelot.Library.DownstreamRouteFinder.Finder;
|
|
||||||
using Ocelot.Library.DownstreamRouteFinder.UrlMatcher;
|
|
||||||
using Ocelot.Library.DownstreamUrlCreator.UrlTemplateReplacer;
|
|
||||||
using Ocelot.Library.HeaderBuilder;
|
|
||||||
using Ocelot.Library.HeaderBuilder.Parser;
|
|
||||||
using Ocelot.Library.RequestBuilder.Builder;
|
|
||||||
using Ocelot.Library.ScopedData;
|
|
||||||
|
|
||||||
namespace Ocelot.Library.DependencyInjection
|
|
||||||
{
|
|
||||||
using Authentication;
|
|
||||||
using Configuration;
|
|
||||||
using Configuration.Yaml;
|
|
||||||
using DownstreamRouteFinder;
|
|
||||||
using Microsoft.AspNetCore.Http;
|
|
||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using RequestBuilder;
|
using Ocelot.Authentication.Handler.Creator;
|
||||||
using Requester;
|
using Ocelot.Authentication.Handler.Factory;
|
||||||
using Responder;
|
using Ocelot.Configuration.Creator;
|
||||||
|
using Ocelot.Configuration.Parser;
|
||||||
|
using Ocelot.Configuration.Provider;
|
||||||
|
using Ocelot.Configuration.Repository;
|
||||||
|
using Ocelot.Configuration.Validator;
|
||||||
|
using Ocelot.Configuration.Yaml;
|
||||||
|
using Ocelot.DownstreamRouteFinder.Finder;
|
||||||
|
using Ocelot.DownstreamRouteFinder.UrlMatcher;
|
||||||
|
using Ocelot.DownstreamUrlCreator.UrlTemplateReplacer;
|
||||||
|
using Ocelot.HeaderBuilder;
|
||||||
|
using Ocelot.HeaderBuilder.Parser;
|
||||||
|
using Ocelot.RequestBuilder.Builder;
|
||||||
|
using Ocelot.Requester;
|
||||||
|
using Ocelot.Responder;
|
||||||
|
using Ocelot.ScopedData;
|
||||||
|
|
||||||
|
namespace Ocelot.DependencyInjection
|
||||||
|
{
|
||||||
public static class ServiceCollectionExtensions
|
public static class ServiceCollectionExtensions
|
||||||
{
|
{
|
||||||
public static IServiceCollection AddOcelotYamlConfiguration(this IServiceCollection services, IConfigurationRoot configurationRoot)
|
public static IServiceCollection AddOcelotYamlConfiguration(this IServiceCollection services, IConfigurationRoot configurationRoot)
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
using Ocelot.Library.DownstreamRouteFinder.UrlMatcher;
|
using System.Collections.Generic;
|
||||||
|
using Ocelot.Configuration;
|
||||||
|
using Ocelot.DownstreamRouteFinder.UrlMatcher;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamRouteFinder
|
namespace Ocelot.DownstreamRouteFinder
|
||||||
{
|
{
|
||||||
using System.Collections.Generic;
|
|
||||||
using Configuration;
|
|
||||||
|
|
||||||
public class DownstreamRoute
|
public class DownstreamRoute
|
||||||
{
|
{
|
||||||
public DownstreamRoute(List<TemplateVariableNameAndValue> templateVariableNameAndValues, ReRoute reRoute)
|
public DownstreamRoute(List<TemplateVariableNameAndValue> templateVariableNameAndValues, ReRoute reRoute)
|
||||||
|
@ -1,12 +1,12 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Ocelot.Library.Configuration.Provider;
|
using Ocelot.Configuration.Provider;
|
||||||
using Ocelot.Library.DownstreamRouteFinder.UrlMatcher;
|
using Ocelot.DownstreamRouteFinder.UrlMatcher;
|
||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamRouteFinder.Finder
|
namespace Ocelot.DownstreamRouteFinder.Finder
|
||||||
{
|
{
|
||||||
public class DownstreamRouteFinder : IDownstreamRouteFinder
|
public class DownstreamRouteFinder : IDownstreamRouteFinder
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamRouteFinder.Finder
|
namespace Ocelot.DownstreamRouteFinder.Finder
|
||||||
{
|
{
|
||||||
public interface IDownstreamRouteFinder
|
public interface IDownstreamRouteFinder
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamRouteFinder.Finder
|
namespace Ocelot.DownstreamRouteFinder.Finder
|
||||||
{
|
{
|
||||||
public class UnableToFindDownstreamRouteError : Error
|
public class UnableToFindDownstreamRouteError : Error
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.DownstreamRouteFinder.Finder;
|
using Ocelot.DownstreamRouteFinder.Finder;
|
||||||
using Ocelot.Library.Middleware;
|
using Ocelot.Middleware;
|
||||||
using Ocelot.Library.ScopedData;
|
using Ocelot.ScopedData;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamRouteFinder.Middleware
|
namespace Ocelot.DownstreamRouteFinder.Middleware
|
||||||
{
|
{
|
||||||
public class DownstreamRouteFinderMiddleware : OcelotMiddleware
|
public class DownstreamRouteFinderMiddleware : OcelotMiddleware
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamRouteFinder.Middleware
|
namespace Ocelot.DownstreamRouteFinder.Middleware
|
||||||
{
|
{
|
||||||
public static class DownstreamRouteFinderMiddlewareExtensions
|
public static class DownstreamRouteFinderMiddlewareExtensions
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
|
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
|
||||||
{
|
{
|
||||||
public interface ITemplateVariableNameAndValueFinder
|
public interface ITemplateVariableNameAndValueFinder
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
|
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
|
||||||
{
|
{
|
||||||
public interface IUrlPathToUrlTemplateMatcher
|
public interface IUrlPathToUrlTemplateMatcher
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.Text.RegularExpressions;
|
using System.Text.RegularExpressions;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
|
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
|
||||||
{
|
{
|
||||||
public class RegExUrlMatcher : IUrlPathToUrlTemplateMatcher
|
public class RegExUrlMatcher : IUrlPathToUrlTemplateMatcher
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
|
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
|
||||||
{
|
{
|
||||||
public class TemplateVariableNameAndValue
|
public class TemplateVariableNameAndValue
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
|
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
|
||||||
{
|
{
|
||||||
public class TemplateVariableNameAndValueFinder : ITemplateVariableNameAndValueFinder
|
public class TemplateVariableNameAndValueFinder : ITemplateVariableNameAndValueFinder
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Ocelot.Library.DownstreamRouteFinder.UrlMatcher
|
namespace Ocelot.DownstreamRouteFinder.UrlMatcher
|
||||||
{
|
{
|
||||||
public class UrlMatch
|
public class UrlMatch
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.DownstreamRouteFinder;
|
using Ocelot.DownstreamRouteFinder;
|
||||||
using Ocelot.Library.DownstreamUrlCreator.UrlTemplateReplacer;
|
using Ocelot.DownstreamUrlCreator.UrlTemplateReplacer;
|
||||||
using Ocelot.Library.Middleware;
|
using Ocelot.Middleware;
|
||||||
using Ocelot.Library.ScopedData;
|
using Ocelot.ScopedData;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamUrlCreator.Middleware
|
namespace Ocelot.DownstreamUrlCreator.Middleware
|
||||||
{
|
{
|
||||||
public class DownstreamUrlCreatorMiddleware : OcelotMiddleware
|
public class DownstreamUrlCreatorMiddleware : OcelotMiddleware
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamUrlCreator.Middleware
|
namespace Ocelot.DownstreamUrlCreator.Middleware
|
||||||
{
|
{
|
||||||
public static class DownstreamUrlCreatorMiddlewareExtensions
|
public static class DownstreamUrlCreatorMiddlewareExtensions
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System.Text;
|
using System.Text;
|
||||||
using Ocelot.Library.DownstreamRouteFinder;
|
using Ocelot.DownstreamRouteFinder;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamUrlCreator.UrlTemplateReplacer
|
namespace Ocelot.DownstreamUrlCreator.UrlTemplateReplacer
|
||||||
{
|
{
|
||||||
public class DownstreamUrlTemplateVariableReplacer : IDownstreamUrlTemplateVariableReplacer
|
public class DownstreamUrlTemplateVariableReplacer : IDownstreamUrlTemplateVariableReplacer
|
||||||
{
|
{
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
using Ocelot.Library.DownstreamRouteFinder;
|
using Ocelot.DownstreamRouteFinder;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.DownstreamUrlCreator.UrlTemplateReplacer
|
namespace Ocelot.DownstreamUrlCreator.UrlTemplateReplacer
|
||||||
{
|
{
|
||||||
public interface IDownstreamUrlTemplateVariableReplacer
|
public interface IDownstreamUrlTemplateVariableReplacer
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Ocelot.Library.Errors
|
namespace Ocelot.Errors
|
||||||
{
|
{
|
||||||
public abstract class Error
|
public abstract class Error
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Ocelot.Library.Errors
|
namespace Ocelot.Errors
|
||||||
{
|
{
|
||||||
public enum OcelotErrorCode
|
public enum OcelotErrorCode
|
||||||
{
|
{
|
||||||
|
@ -2,11 +2,11 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.Extensions.Primitives;
|
using Microsoft.Extensions.Primitives;
|
||||||
using Ocelot.Library.Configuration;
|
using Ocelot.Configuration;
|
||||||
using Ocelot.Library.HeaderBuilder.Parser;
|
using Ocelot.HeaderBuilder.Parser;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.HeaderBuilder
|
namespace Ocelot.HeaderBuilder
|
||||||
{
|
{
|
||||||
public class AddHeadersToRequest : IAddHeadersToRequest
|
public class AddHeadersToRequest : IAddHeadersToRequest
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.Configuration;
|
using Ocelot.Configuration;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.HeaderBuilder
|
namespace Ocelot.HeaderBuilder
|
||||||
{
|
{
|
||||||
public interface IAddHeadersToRequest
|
public interface IAddHeadersToRequest
|
||||||
{
|
{
|
||||||
|
@ -1,11 +1,11 @@
|
|||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.DownstreamRouteFinder;
|
using Ocelot.DownstreamRouteFinder;
|
||||||
using Ocelot.Library.Middleware;
|
using Ocelot.Middleware;
|
||||||
using Ocelot.Library.ScopedData;
|
using Ocelot.ScopedData;
|
||||||
|
|
||||||
namespace Ocelot.Library.HeaderBuilder.Middleware
|
namespace Ocelot.HeaderBuilder.Middleware
|
||||||
{
|
{
|
||||||
public class HttpRequestHeadersBuilderMiddleware : OcelotMiddleware
|
public class HttpRequestHeadersBuilderMiddleware : OcelotMiddleware
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
|
||||||
namespace Ocelot.Library.HeaderBuilder.Middleware
|
namespace Ocelot.HeaderBuilder.Middleware
|
||||||
{
|
{
|
||||||
public static class HttpRequestHeadersBuilderMiddlewareExtensions
|
public static class HttpRequestHeadersBuilderMiddlewareExtensions
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
namespace Ocelot.Library.HeaderBuilder.Parser
|
namespace Ocelot.HeaderBuilder.Parser
|
||||||
{
|
{
|
||||||
public class CannotFindClaimError : Error
|
public class CannotFindClaimError : Error
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.HeaderBuilder.Parser
|
namespace Ocelot.HeaderBuilder.Parser
|
||||||
{
|
{
|
||||||
public class ClaimsParser : IClaimsParser
|
public class ClaimsParser : IClaimsParser
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.HeaderBuilder.Parser
|
namespace Ocelot.HeaderBuilder.Parser
|
||||||
{
|
{
|
||||||
public interface IClaimsParser
|
public interface IClaimsParser
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,9 @@
|
|||||||
using Ocelot.Library.ScopedData;
|
using System.Collections.Generic;
|
||||||
|
using Ocelot.Errors;
|
||||||
|
using Ocelot.ScopedData;
|
||||||
|
|
||||||
namespace Ocelot.Library.Middleware
|
namespace Ocelot.Middleware
|
||||||
{
|
{
|
||||||
using System.Collections.Generic;
|
|
||||||
using Errors;
|
|
||||||
|
|
||||||
public abstract class OcelotMiddleware
|
public abstract class OcelotMiddleware
|
||||||
{
|
{
|
||||||
private readonly IScopedRequestDataRepository _scopedRequestDataRepository;
|
private readonly IScopedRequestDataRepository _scopedRequestDataRepository;
|
||||||
|
@ -1,15 +1,14 @@
|
|||||||
using Ocelot.Library.Authentication.Middleware;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Ocelot.Library.DownstreamRouteFinder.Middleware;
|
using Ocelot.Authentication.Middleware;
|
||||||
using Ocelot.Library.DownstreamUrlCreator.Middleware;
|
using Ocelot.DownstreamRouteFinder.Middleware;
|
||||||
using Ocelot.Library.HeaderBuilder.Middleware;
|
using Ocelot.DownstreamUrlCreator.Middleware;
|
||||||
using Ocelot.Library.RequestBuilder.Middleware;
|
using Ocelot.HeaderBuilder.Middleware;
|
||||||
using Ocelot.Library.Requester.Middleware;
|
using Ocelot.RequestBuilder.Middleware;
|
||||||
using Ocelot.Library.Responder.Middleware;
|
using Ocelot.Requester.Middleware;
|
||||||
|
using Ocelot.Responder.Middleware;
|
||||||
|
|
||||||
namespace Ocelot.Library.Middleware
|
namespace Ocelot.Middleware
|
||||||
{
|
{
|
||||||
using Microsoft.AspNetCore.Builder;
|
|
||||||
|
|
||||||
public static class OcelotMiddlewareExtensions
|
public static class OcelotMiddlewareExtensions
|
||||||
{
|
{
|
||||||
public static IApplicationBuilder UseOcelot(this IApplicationBuilder builder)
|
public static IApplicationBuilder UseOcelot(this IApplicationBuilder builder)
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
namespace Ocelot.Library.Middleware
|
using Ocelot.Errors;
|
||||||
{
|
|
||||||
using Errors;
|
|
||||||
|
|
||||||
|
namespace Ocelot.Middleware
|
||||||
|
{
|
||||||
public class UnauthenticatedError : Error
|
public class UnauthenticatedError : Error
|
||||||
{
|
{
|
||||||
public UnauthenticatedError(string message) : base(message, OcelotErrorCode.UnauthenticatedError)
|
public UnauthenticatedError(string message) : base(message, OcelotErrorCode.UnauthenticatedError)
|
||||||
|
@ -7,7 +7,7 @@ using System.Runtime.InteropServices;
|
|||||||
// associated with an assembly.
|
// associated with an assembly.
|
||||||
[assembly: AssemblyConfiguration("")]
|
[assembly: AssemblyConfiguration("")]
|
||||||
[assembly: AssemblyCompany("")]
|
[assembly: AssemblyCompany("")]
|
||||||
[assembly: AssemblyProduct("Ocelot.Library")]
|
[assembly: AssemblyProduct("Ocelot")]
|
||||||
[assembly: AssemblyTrademark("")]
|
[assembly: AssemblyTrademark("")]
|
||||||
|
|
||||||
// Setting ComVisible to false makes the types in this assembly not visible
|
// Setting ComVisible to false makes the types in this assembly not visible
|
||||||
|
@ -5,9 +5,9 @@ using System.Net.Http;
|
|||||||
using System.Net.Http.Headers;
|
using System.Net.Http.Headers;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.RequestBuilder.Builder
|
namespace Ocelot.RequestBuilder.Builder
|
||||||
{
|
{
|
||||||
public class HttpRequestBuilder : IRequestBuilder
|
public class HttpRequestBuilder : IRequestBuilder
|
||||||
{
|
{
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using System.IO;
|
using System.IO;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.RequestBuilder.Builder
|
namespace Ocelot.RequestBuilder.Builder
|
||||||
{
|
{
|
||||||
public interface IRequestBuilder
|
public interface IRequestBuilder
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.Middleware;
|
using Ocelot.Middleware;
|
||||||
using Ocelot.Library.RequestBuilder.Builder;
|
using Ocelot.RequestBuilder.Builder;
|
||||||
using Ocelot.Library.ScopedData;
|
using Ocelot.ScopedData;
|
||||||
|
|
||||||
namespace Ocelot.Library.RequestBuilder.Middleware
|
namespace Ocelot.RequestBuilder.Middleware
|
||||||
{
|
{
|
||||||
public class HttpRequestBuilderMiddleware : OcelotMiddleware
|
public class HttpRequestBuilderMiddleware : OcelotMiddleware
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
|
||||||
namespace Ocelot.Library.RequestBuilder.Middleware
|
namespace Ocelot.RequestBuilder.Middleware
|
||||||
{
|
{
|
||||||
public static class HttpRequestBuilderMiddlewareExtensions
|
public static class HttpRequestBuilderMiddlewareExtensions
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
namespace Ocelot.Library.RequestBuilder
|
using System.Net;
|
||||||
{
|
|
||||||
using System.Net;
|
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
|
|
||||||
|
namespace Ocelot.RequestBuilder
|
||||||
|
{
|
||||||
public class Request
|
public class Request
|
||||||
{
|
{
|
||||||
public Request(HttpRequestMessage httpRequestMessage, CookieContainer cookieContainer)
|
public Request(HttpRequestMessage httpRequestMessage, CookieContainer cookieContainer)
|
||||||
|
@ -1,13 +1,13 @@
|
|||||||
namespace Ocelot.Library.Requester
|
using System;
|
||||||
{
|
|
||||||
using System;
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Errors;
|
using Ocelot.Errors;
|
||||||
using RequestBuilder;
|
using Ocelot.RequestBuilder;
|
||||||
using Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
|
namespace Ocelot.Requester
|
||||||
|
{
|
||||||
public class HttpClientHttpRequester : IHttpRequester
|
public class HttpClientHttpRequester : IHttpRequester
|
||||||
{
|
{
|
||||||
public async Task<Response<HttpResponseMessage>> GetResponse(Request request)
|
public async Task<Response<HttpResponseMessage>> GetResponse(Request request)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
namespace Ocelot.Library.Requester
|
using System.Net.Http;
|
||||||
{
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using RequestBuilder;
|
using Ocelot.RequestBuilder;
|
||||||
using Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
|
namespace Ocelot.Requester
|
||||||
|
{
|
||||||
public interface IHttpRequester
|
public interface IHttpRequester
|
||||||
{
|
{
|
||||||
Task<Response<HttpResponseMessage>> GetResponse(Request request);
|
Task<Response<HttpResponseMessage>> GetResponse(Request request);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.Middleware;
|
using Ocelot.Middleware;
|
||||||
using Ocelot.Library.RequestBuilder;
|
using Ocelot.RequestBuilder;
|
||||||
using Ocelot.Library.ScopedData;
|
using Ocelot.ScopedData;
|
||||||
|
|
||||||
namespace Ocelot.Library.Requester.Middleware
|
namespace Ocelot.Requester.Middleware
|
||||||
{
|
{
|
||||||
public class HttpRequesterMiddleware : OcelotMiddleware
|
public class HttpRequesterMiddleware : OcelotMiddleware
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
|
||||||
namespace Ocelot.Library.Requester.Middleware
|
namespace Ocelot.Requester.Middleware
|
||||||
{
|
{
|
||||||
public static class HttpRequesterMiddlewareExtensions
|
public static class HttpRequesterMiddlewareExtensions
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
namespace Ocelot.Library.Requester
|
using System;
|
||||||
{
|
using Ocelot.Errors;
|
||||||
using System;
|
|
||||||
using Errors;
|
|
||||||
|
|
||||||
|
namespace Ocelot.Requester
|
||||||
|
{
|
||||||
public class UnableToCompleteRequestError : Error
|
public class UnableToCompleteRequestError : Error
|
||||||
{
|
{
|
||||||
public UnableToCompleteRequestError(Exception exception)
|
public UnableToCompleteRequestError(Exception exception)
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
namespace Ocelot.Library.Responder
|
|
||||||
{
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Errors;
|
using Ocelot.Errors;
|
||||||
using Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
|
namespace Ocelot.Responder
|
||||||
|
{
|
||||||
public class ErrorsToHttpStatusCodeMapper : IErrorsToHttpStatusCodeMapper
|
public class ErrorsToHttpStatusCodeMapper : IErrorsToHttpStatusCodeMapper
|
||||||
{
|
{
|
||||||
public Response<int> Map(List<Error> errors)
|
public Response<int> Map(List<Error> errors)
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
namespace Ocelot.Library.Responder
|
using System.Net.Http;
|
||||||
{
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
|
||||||
|
namespace Ocelot.Responder
|
||||||
|
{
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Cannot unit test things in this class due to methods not being implemented
|
/// Cannot unit test things in this class due to methods not being implemented
|
||||||
/// on .net concretes used for testing
|
/// on .net concretes used for testing
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
namespace Ocelot.Library.Responder
|
using System.Collections.Generic;
|
||||||
{
|
using Ocelot.Errors;
|
||||||
using System.Collections.Generic;
|
using Ocelot.Responses;
|
||||||
using Errors;
|
|
||||||
using Responses;
|
|
||||||
|
|
||||||
|
namespace Ocelot.Responder
|
||||||
|
{
|
||||||
public interface IErrorsToHttpStatusCodeMapper
|
public interface IErrorsToHttpStatusCodeMapper
|
||||||
{
|
{
|
||||||
Response<int> Map(List<Error> errors);
|
Response<int> Map(List<Error> errors);
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
namespace Ocelot.Library.Responder
|
using System.Net.Http;
|
||||||
{
|
|
||||||
using System.Net.Http;
|
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
|
|
||||||
|
namespace Ocelot.Responder
|
||||||
|
{
|
||||||
public interface IHttpResponder
|
public interface IHttpResponder
|
||||||
{
|
{
|
||||||
Task<HttpContext> CreateResponse(HttpContext context, HttpResponseMessage response);
|
Task<HttpContext> CreateResponse(HttpContext context, HttpResponseMessage response);
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
using System.Net.Http;
|
using System.Net.Http;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.Middleware;
|
using Ocelot.Middleware;
|
||||||
using Ocelot.Library.ScopedData;
|
using Ocelot.ScopedData;
|
||||||
|
|
||||||
namespace Ocelot.Library.Responder.Middleware
|
namespace Ocelot.Responder.Middleware
|
||||||
{
|
{
|
||||||
public class HttpResponderMiddleware : OcelotMiddleware
|
public class HttpResponderMiddleware : OcelotMiddleware
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
|
|
||||||
namespace Ocelot.Library.Responder.Middleware
|
namespace Ocelot.Responder.Middleware
|
||||||
{
|
{
|
||||||
public static class HttpResponderMiddlewareExtensions
|
public static class HttpResponderMiddlewareExtensions
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
namespace Ocelot.Library.Responses
|
|
||||||
{
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
|
namespace Ocelot.Responses
|
||||||
|
{
|
||||||
public class ErrorResponse : Response
|
public class ErrorResponse : Response
|
||||||
{
|
{
|
||||||
public ErrorResponse(List<Error> errors) : base(errors)
|
public ErrorResponse(List<Error> errors) : base(errors)
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
namespace Ocelot.Library.Responses
|
|
||||||
{
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
|
namespace Ocelot.Responses
|
||||||
|
{
|
||||||
public class ErrorResponse<T> : Response<T>
|
public class ErrorResponse<T> : Response<T>
|
||||||
{
|
{
|
||||||
public ErrorResponse(List<Error> errors) : base(errors)
|
public ErrorResponse(List<Error> errors) : base(errors)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Ocelot.Library.Responses
|
namespace Ocelot.Responses
|
||||||
{
|
{
|
||||||
public class OkResponse : Response
|
public class OkResponse : Response
|
||||||
{
|
{
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
namespace Ocelot.Library.Responses
|
namespace Ocelot.Responses
|
||||||
{
|
{
|
||||||
public class OkResponse<T> : Response<T>
|
public class OkResponse<T> : Response<T>
|
||||||
{
|
{
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
namespace Ocelot.Library.Responses
|
|
||||||
{
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
|
namespace Ocelot.Responses
|
||||||
|
{
|
||||||
public abstract class Response
|
public abstract class Response
|
||||||
{
|
{
|
||||||
protected Response()
|
protected Response()
|
||||||
|
@ -1,8 +1,8 @@
|
|||||||
namespace Ocelot.Library.Responses
|
|
||||||
{
|
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
|
namespace Ocelot.Responses
|
||||||
|
{
|
||||||
public abstract class Response<T> : Response
|
public abstract class Response<T> : Response
|
||||||
{
|
{
|
||||||
protected Response(T data)
|
protected Response(T data)
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
namespace Ocelot.Library.ScopedData
|
namespace Ocelot.ScopedData
|
||||||
{
|
{
|
||||||
public class CannotAddDataError : Error
|
public class CannotAddDataError : Error
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
|
|
||||||
namespace Ocelot.Library.ScopedData
|
namespace Ocelot.ScopedData
|
||||||
{
|
{
|
||||||
public class CannotFindDataError : Error
|
public class CannotFindDataError : Error
|
||||||
{
|
{
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.ScopedData
|
namespace Ocelot.ScopedData
|
||||||
{
|
{
|
||||||
public interface IScopedRequestDataRepository
|
public interface IScopedRequestDataRepository
|
||||||
{
|
{
|
||||||
|
@ -1,10 +1,10 @@
|
|||||||
using System;
|
using System;
|
||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
|
|
||||||
namespace Ocelot.Library.ScopedData
|
namespace Ocelot.ScopedData
|
||||||
{
|
{
|
||||||
public class ScopedRequestDataRepository : IScopedRequestDataRepository
|
public class ScopedRequestDataRepository : IScopedRequestDataRepository
|
||||||
{
|
{
|
||||||
|
@ -13,6 +13,7 @@ using Microsoft.AspNetCore.Http;
|
|||||||
using Microsoft.AspNetCore.TestHost;
|
using Microsoft.AspNetCore.TestHost;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
|
using Ocelot.Configuration.Yaml;
|
||||||
using Ocelot.ManualTest;
|
using Ocelot.ManualTest;
|
||||||
using Shouldly;
|
using Shouldly;
|
||||||
using TestStack.BDDfy;
|
using TestStack.BDDfy;
|
||||||
@ -22,7 +23,6 @@ using YamlDotNet.Serialization;
|
|||||||
namespace Ocelot.AcceptanceTests
|
namespace Ocelot.AcceptanceTests
|
||||||
{
|
{
|
||||||
using System.Security.Claims;
|
using System.Security.Claims;
|
||||||
using Library.Configuration.Yaml;
|
|
||||||
|
|
||||||
public class AuthenticationTests : IDisposable
|
public class AuthenticationTests : IDisposable
|
||||||
{
|
{
|
||||||
|
@ -14,7 +14,7 @@ using Microsoft.AspNetCore.Http;
|
|||||||
using Microsoft.AspNetCore.TestHost;
|
using Microsoft.AspNetCore.TestHost;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Newtonsoft.Json;
|
using Newtonsoft.Json;
|
||||||
using Ocelot.Library.Configuration.Yaml;
|
using Ocelot.Configuration.Yaml;
|
||||||
using Ocelot.ManualTest;
|
using Ocelot.ManualTest;
|
||||||
using Shouldly;
|
using Shouldly;
|
||||||
using TestStack.BDDfy;
|
using TestStack.BDDfy;
|
||||||
|
@ -6,7 +6,7 @@ using System.Net.Http;
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.TestHost;
|
using Microsoft.AspNetCore.TestHost;
|
||||||
using Ocelot.Library.Configuration.Yaml;
|
using Ocelot.Configuration.Yaml;
|
||||||
using Ocelot.ManualTest;
|
using Ocelot.ManualTest;
|
||||||
using Shouldly;
|
using Shouldly;
|
||||||
using TestStack.BDDfy;
|
using TestStack.BDDfy;
|
||||||
|
@ -7,6 +7,7 @@ using Microsoft.AspNetCore.Builder;
|
|||||||
using Microsoft.AspNetCore.Hosting;
|
using Microsoft.AspNetCore.Hosting;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Microsoft.AspNetCore.TestHost;
|
using Microsoft.AspNetCore.TestHost;
|
||||||
|
using Ocelot.Configuration.Yaml;
|
||||||
using Ocelot.ManualTest;
|
using Ocelot.ManualTest;
|
||||||
using Shouldly;
|
using Shouldly;
|
||||||
using TestStack.BDDfy;
|
using TestStack.BDDfy;
|
||||||
@ -15,8 +16,6 @@ using YamlDotNet.Serialization;
|
|||||||
|
|
||||||
namespace Ocelot.AcceptanceTests
|
namespace Ocelot.AcceptanceTests
|
||||||
{
|
{
|
||||||
using Library.Configuration.Yaml;
|
|
||||||
|
|
||||||
public class RoutingTests : IDisposable
|
public class RoutingTests : IDisposable
|
||||||
{
|
{
|
||||||
private TestServer _server;
|
private TestServer _server;
|
||||||
|
@ -3,8 +3,8 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.Extensions.Configuration;
|
using Microsoft.Extensions.Configuration;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Microsoft.Extensions.Logging;
|
using Microsoft.Extensions.Logging;
|
||||||
using Ocelot.Library.DependencyInjection;
|
using Ocelot.DependencyInjection;
|
||||||
using Ocelot.Library.Middleware;
|
using Ocelot.Middleware;
|
||||||
|
|
||||||
namespace Ocelot.ManualTest
|
namespace Ocelot.ManualTest
|
||||||
{
|
{
|
||||||
|
@ -3,20 +3,18 @@ using System.Threading.Tasks;
|
|||||||
using Microsoft.AspNetCore.Builder;
|
using Microsoft.AspNetCore.Builder;
|
||||||
using Microsoft.AspNetCore.Http;
|
using Microsoft.AspNetCore.Http;
|
||||||
using Moq;
|
using Moq;
|
||||||
using Ocelot.Library.Authentication.Handler;
|
using Ocelot.Authentication.Handler;
|
||||||
using Ocelot.Library.Authentication.Handler.Creator;
|
using Ocelot.Authentication.Handler.Creator;
|
||||||
using Ocelot.Library.Authentication.Handler.Factory;
|
using Ocelot.Authentication.Handler.Factory;
|
||||||
|
using Ocelot.Errors;
|
||||||
|
using Ocelot.Responses;
|
||||||
using Shouldly;
|
using Shouldly;
|
||||||
using TestStack.BDDfy;
|
using TestStack.BDDfy;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
using AuthenticationOptions = Ocelot.Configuration.AuthenticationOptions;
|
||||||
|
|
||||||
namespace Ocelot.UnitTests.Authentication
|
namespace Ocelot.UnitTests.Authentication
|
||||||
{
|
{
|
||||||
using Library.Authentication;
|
|
||||||
using Library.Configuration;
|
|
||||||
using Library.Errors;
|
|
||||||
using Library.Responses;
|
|
||||||
|
|
||||||
public class AuthenticationHandlerFactoryTests
|
public class AuthenticationHandlerFactoryTests
|
||||||
{
|
{
|
||||||
private readonly IAuthenticationHandlerFactory _authenticationHandlerFactory;
|
private readonly IAuthenticationHandlerFactory _authenticationHandlerFactory;
|
||||||
|
@ -6,13 +6,13 @@ using Microsoft.AspNetCore.Hosting;
|
|||||||
using Microsoft.AspNetCore.TestHost;
|
using Microsoft.AspNetCore.TestHost;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
using Microsoft.Extensions.DependencyInjection;
|
||||||
using Moq;
|
using Moq;
|
||||||
using Ocelot.Library.Authentication.Handler.Factory;
|
using Ocelot.Authentication.Handler.Factory;
|
||||||
using Ocelot.Library.Authentication.Middleware;
|
using Ocelot.Authentication.Middleware;
|
||||||
using Ocelot.Library.Configuration.Builder;
|
using Ocelot.Configuration.Builder;
|
||||||
using Ocelot.Library.DownstreamRouteFinder;
|
using Ocelot.DownstreamRouteFinder;
|
||||||
using Ocelot.Library.DownstreamRouteFinder.UrlMatcher;
|
using Ocelot.DownstreamRouteFinder.UrlMatcher;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
using Ocelot.Library.ScopedData;
|
using Ocelot.ScopedData;
|
||||||
using TestStack.BDDfy;
|
using TestStack.BDDfy;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
|
@ -1,9 +1,9 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using Ocelot.Library.Configuration;
|
using Ocelot.Configuration;
|
||||||
using Ocelot.Library.Configuration.Parser;
|
using Ocelot.Configuration.Parser;
|
||||||
using Ocelot.Library.Errors;
|
using Ocelot.Errors;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
using Shouldly;
|
using Shouldly;
|
||||||
using TestStack.BDDfy;
|
using TestStack.BDDfy;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
@ -1,14 +1,13 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using Ocelot.Library.Configuration.Validator;
|
using Ocelot.Configuration.Validator;
|
||||||
|
using Ocelot.Configuration.Yaml;
|
||||||
|
using Ocelot.Responses;
|
||||||
using Shouldly;
|
using Shouldly;
|
||||||
using TestStack.BDDfy;
|
using TestStack.BDDfy;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
|
||||||
namespace Ocelot.UnitTests.Configuration
|
namespace Ocelot.UnitTests.Configuration
|
||||||
{
|
{
|
||||||
using Library.Configuration.Yaml;
|
|
||||||
using Library.Responses;
|
|
||||||
|
|
||||||
public class ConfigurationValidationTests
|
public class ConfigurationValidationTests
|
||||||
{
|
{
|
||||||
private YamlConfiguration _yamlConfiguration;
|
private YamlConfiguration _yamlConfiguration;
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
using System.Collections.Generic;
|
using System.Collections.Generic;
|
||||||
using System.Linq;
|
using System.Linq;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using Ocelot.Library.Configuration;
|
using Ocelot.Configuration;
|
||||||
using Ocelot.Library.Configuration.Builder;
|
using Ocelot.Configuration.Builder;
|
||||||
using Ocelot.Library.Configuration.Repository;
|
using Ocelot.Configuration.Repository;
|
||||||
using Ocelot.Library.Responses;
|
using Ocelot.Responses;
|
||||||
using Shouldly;
|
using Shouldly;
|
||||||
using TestStack.BDDfy;
|
using TestStack.BDDfy;
|
||||||
using Xunit;
|
using Xunit;
|
||||||
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
x
Reference in New Issue
Block a user