Skip to content
This repository was archived by the owner on Nov 20, 2018. It is now read-only.

Remove ConfigureDefaultOptions #856

Merged
merged 1 commit into from
Jun 5, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
using System;
using Microsoft.AspNetCore.Authentication;
using Microsoft.Extensions.DependencyInjection.Extensions;
using Microsoft.Extensions.Configuration;
using Microsoft.Extensions.Options.Infrastructure;

namespace Microsoft.Extensions.DependencyInjection
{
Expand All @@ -30,7 +28,6 @@ public static IServiceCollection AddAuthenticationCore(this IServiceCollection s
services.TryAddSingleton<IClaimsTransformation, NoopClaimsTransformation>(); // Can be replaced with scoped ones that use DbContext
services.TryAddScoped<IAuthenticationHandlerProvider, AuthenticationHandlerProvider>();
services.TryAddSingleton<IAuthenticationSchemeProvider, AuthenticationSchemeProvider>();
services.AddTransient<ConfigureDefaultOptions<AuthenticationOptions>, DefaultConfigureOptions>();
return services;
}

Expand All @@ -55,13 +52,5 @@ public static IServiceCollection AddAuthenticationCore(this IServiceCollection s
services.Configure(configureOptions);
return services;
}

private class DefaultConfigureOptions : ConfigureDefaultOptions<AuthenticationOptions>
{
public DefaultConfigureOptions(IConfiguration config) :
base(options => config.GetSection("Microsoft:AspNetCore:Authentication").Bind(options))
{ }
}

}
}
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
<ProjectReference Include="..\Microsoft.AspNetCore.Authentication.Abstractions\Microsoft.AspNetCore.Authentication.Abstractions.csproj" />
<ProjectReference Include="..\Microsoft.AspNetCore.Http\Microsoft.AspNetCore.Http.csproj" />
<ProjectReference Include="..\Microsoft.AspNetCore.Http.Extensions\Microsoft.AspNetCore.Http.Extensions.csproj" />
<PackageReference Include="Microsoft.Extensions.Configuration.Binder" Version="$(AspNetCoreVersion)" />
<PackageReference Include="Microsoft.Extensions.TaskCache.Sources" Version="$(AspNetCoreVersion)" PrivateAssets="All" />
</ItemGroup>

Expand Down
40 changes: 0 additions & 40 deletions test/Microsoft.AspNetCore.Authentication.Core.Test/ConfigTests.cs

This file was deleted.