mirror of
https://github.com/nsnail/Ocelot.git
synced 2025-06-19 03:38:16 +08:00
more refactoring
This commit is contained in:
BIN
src/.DS_Store
vendored
Normal file
BIN
src/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
src/Ocelot/.DS_Store
vendored
Normal file
BIN
src/Ocelot/.DS_Store
vendored
Normal file
Binary file not shown.
BIN
src/Ocelot/Authentication/Handler/.DS_Store
vendored
Normal file
BIN
src/Ocelot/Authentication/Handler/.DS_Store
vendored
Normal file
Binary file not shown.
@ -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();
|
||||
|
||||
|
@ -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);
|
||||
}
|
||||
}
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -1,5 +1,4 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Security.Claims;
|
||||
using Ocelot.Errors;
|
||||
using Ocelot.Responses;
|
||||
|
@ -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);
|
||||
|
Reference in New Issue
Block a user