more refactoring

This commit is contained in:
Tom Gardham-Pallister
2017-02-08 18:47:35 +00:00
parent 9d790a449b
commit f7fe7c0f49
11 changed files with 6 additions and 14 deletions

BIN
src/.DS_Store vendored Normal file

Binary file not shown.

BIN
src/Ocelot/.DS_Store vendored Normal file

Binary file not shown.

Binary file not shown.

View File

@ -12,7 +12,7 @@ namespace Ocelot.Authentication.Handler.Creator
/// </summary>
public class AuthenticationHandlerCreator : IAuthenticationHandlerCreator
{
public Response<RequestDelegate> CreateIdentityServerAuthenticationHandler(IApplicationBuilder app, AuthenticationOptions authOptions)
public Response<RequestDelegate> Create(IApplicationBuilder app, AuthenticationOptions authOptions)
{
var builder = app.New();

View File

@ -8,6 +8,6 @@ namespace Ocelot.Authentication.Handler.Creator
public interface IAuthenticationHandlerCreator
{
Response<RequestDelegate> CreateIdentityServerAuthenticationHandler(IApplicationBuilder app, AuthenticationOptions authOptions);
Response<RequestDelegate> Create(IApplicationBuilder app, AuthenticationOptions authOptions);
}
}

View File

@ -19,7 +19,7 @@ namespace Ocelot.Authentication.Handler.Factory
public Response<AuthenticationHandler> Get(IApplicationBuilder app, AuthenticationOptions authOptions)
{
var handler = _creator.CreateIdentityServerAuthenticationHandler(app, authOptions);
var handler = _creator.Create(app, authOptions);
if (!handler.IsError)
{

View File

@ -1,5 +1,4 @@
using System.Collections.Generic;
using System.Linq;
using System.Security.Claims;
using Ocelot.Errors;
using Ocelot.Responses;

View File

@ -55,10 +55,6 @@ namespace Ocelot.Configuration.Creator
return new OkResponse<IOcelotConfiguration>(config);
}
/// <summary>
/// This method is meant to be tempoary to convert a config to an ocelot config...probably wont keep this but we will see
/// will need a refactor at some point as its crap
/// </summary>
private async Task<IOcelotConfiguration> SetUpConfiguration()
{
var response = _configurationValidator.IsValid(_options.Value);