mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-12-24 19:45:49 +08:00
removed thing that checks if route is authorised cos we dont need it
This commit is contained in:
47
src/Ocelot.Library/Infrastructure/Builder/ReRouteBuilder.cs
Normal file
47
src/Ocelot.Library/Infrastructure/Builder/ReRouteBuilder.cs
Normal file
@@ -0,0 +1,47 @@
|
||||
namespace Ocelot.Library.Infrastructure.Builder
|
||||
{
|
||||
using Configuration;
|
||||
|
||||
public class ReRouteBuilder
|
||||
{
|
||||
private string _downstreamTemplate;
|
||||
private string _upstreamTemplate;
|
||||
private string _upstreamTemplatePattern;
|
||||
private string _upstreamHttpMethod;
|
||||
private bool _isAuthenticated;
|
||||
private string _authenticationProvider;
|
||||
|
||||
public void WithDownstreamTemplate(string input)
|
||||
{
|
||||
_downstreamTemplate = input;
|
||||
}
|
||||
|
||||
public void WithUpstreamTemplate(string input)
|
||||
{
|
||||
_upstreamTemplate = input;
|
||||
}
|
||||
|
||||
public void WithUpstreamTemplatePattern(string input)
|
||||
{
|
||||
_upstreamTemplatePattern = input;
|
||||
}
|
||||
public void WithUpstreamHttpMethod(string input)
|
||||
{
|
||||
_upstreamHttpMethod = input;
|
||||
}
|
||||
public void WithIsAuthenticated(bool input)
|
||||
{
|
||||
_isAuthenticated = input;
|
||||
|
||||
}
|
||||
public void WithAuthenticationProvider(string input)
|
||||
{
|
||||
_authenticationProvider = input;
|
||||
}
|
||||
|
||||
public ReRoute Build()
|
||||
{
|
||||
return new ReRoute(_downstreamTemplate, _upstreamTemplate, _upstreamHttpMethod, _upstreamTemplatePattern, _isAuthenticated, _authenticationProvider);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user