React to Named Options going away in Auth test
This commit is contained in:
parent
b34dd3b812
commit
2b52942faf
|
|
@ -5,7 +5,6 @@ using Microsoft.AspNet.Authentication;
|
|||
using Microsoft.AspNet.Builder;
|
||||
using Microsoft.Framework.WebEncoders;
|
||||
using Microsoft.Framework.Logging;
|
||||
using Microsoft.Framework.OptionsModel;
|
||||
|
||||
namespace FiltersWebSite
|
||||
{
|
||||
|
|
@ -13,12 +12,11 @@ namespace FiltersWebSite
|
|||
{
|
||||
public AuthorizeBasicMiddleware(
|
||||
RequestDelegate next,
|
||||
IOptions<BasicOptions> options,
|
||||
ILoggerFactory loggerFactory,
|
||||
IUrlEncoder encoder,
|
||||
string authScheme) :
|
||||
base(next, options, loggerFactory, encoder,
|
||||
new ConfigureOptions<BasicOptions>(o => o.AuthenticationScheme = authScheme))
|
||||
base(next, new BasicOptions { AuthenticationScheme = authScheme }, loggerFactory,
|
||||
encoder, configureOptions: null)
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -11,10 +11,12 @@ using Microsoft.Framework.OptionsModel;
|
|||
|
||||
namespace FiltersWebSite
|
||||
{
|
||||
public class BasicOptions : AuthenticationOptions
|
||||
public class BasicOptions : AuthenticationOptions, IOptions<BasicOptions>
|
||||
{
|
||||
public BasicOptions()
|
||||
{
|
||||
}
|
||||
|
||||
public BasicOptions Value { get { return this; } }
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue