Skip to content

Commit

Permalink
Merge pull request #67 from marcominerva/develop
Browse files Browse the repository at this point in the history
Delete unused class
  • Loading branch information
marcominerva authored Dec 1, 2022
2 parents 664ad52 + 1f28d7e commit 746b2cd
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 26 deletions.
17 changes: 0 additions & 17 deletions src/SimpleAuthentication/DefaultSimpleAuthenticationBuilder.cs

This file was deleted.

2 changes: 1 addition & 1 deletion src/SimpleAuthentication/SimpleAuthentication.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
</ItemGroup>

<ItemGroup>
<PackageReference Include="SimpleAuthenticationTools.Abstractions" Version="1.0.11" />
<PackageReference Include="SimpleAuthenticationTools.Abstractions" Version="1.0.15" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerGen" Version="6.4.0" />
</ItemGroup>

Expand Down
15 changes: 7 additions & 8 deletions src/SimpleAuthentication/SimpleAuthenticationExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,6 @@ namespace SimpleAuthentication;
/// <summary>
/// Provides extension methods for adding authentication support in ASP.NET Core.
/// </summary>
/// <seealso cref="ISimpleAuthenticationBuilder"/>
/// <seealso cref="AuthenticationBuilder"/>
public static class SimpleAuthenticationExtensions
{
Expand All @@ -31,13 +30,13 @@ public static class SimpleAuthenticationExtensions
/// <param name="configuration">The <see cref="IConfiguration"/> being bound.</param>
/// <param name="sectionName">The name of the configuration section that holds authentication settings (default: Authentication).</param>
/// <param name="addAuthorizationServices">Set to <see langword="true"/> to automatically add Authorization policy services.</param>
/// <returns>A <see cref="ISimpleAuthenticationBuilder"/> that can be used to further customize authentication.</returns>
/// <returns>A <see cref="AuthenticationBuilder"/> that can be used to further customize authentication.</returns>
/// <exception cref="ArgumentException">Configuration is invalid.</exception>
/// <exception cref="ArgumentNullException">One or more required configuration settings are missing.</exception>
/// <seealso cref="IServiceCollection"/>
/// <seealso cref="IConfiguration"/>
/// <seealso cref="ISimpleAuthenticationBuilder"/>
public static ISimpleAuthenticationBuilder AddSimpleAuthentication(this IServiceCollection services, IConfiguration configuration, string sectionName = "Authentication", bool addAuthorizationServices = true)
/// <seealso cref="AuthenticationBuilder"/>
public static AuthenticationBuilder AddSimpleAuthentication(this IServiceCollection services, IConfiguration configuration, string sectionName = "Authentication", bool addAuthorizationServices = true)
{
var defaultAuthenticationScheme = configuration.GetValue<string>($"{sectionName}:DefaultScheme");

Expand All @@ -57,13 +56,13 @@ public static ISimpleAuthenticationBuilder AddSimpleAuthentication(this IService
/// <param name="configuration">The <see cref="IConfiguration"/> being bound.</param>
/// <param name="sectionName">The name of the configuration section that holds authentication settings (default: Authentication).</param>
/// <param name="addAuthorizationServices">Set to <see langword="true"/> to automatically add Authorization policy services.</param>
/// <returns>A <see cref="ISimpleAuthenticationBuilder"/> that can be used to further customize authentication.</returns>
/// <returns>A <see cref="AuthenticationBuilder"/> that can be used to further customize authentication.</returns>
/// <exception cref="ArgumentException">Configuration is invalid.</exception>
/// <exception cref="ArgumentNullException">One or more required configuration settings are missing.</exception>
/// <seealso cref="AuthenticationBuilder"/>
/// <seealso cref="IConfiguration"/>
/// <seealso cref="ISimpleAuthenticationBuilder"/>
public static ISimpleAuthenticationBuilder AddSimpleAuthentication(this AuthenticationBuilder builder, IConfiguration configuration, string sectionName = "Authentication", bool addAuthorizationServices = true)
/// <seealso cref="AuthenticationBuilder"/>
public static AuthenticationBuilder AddSimpleAuthentication(this AuthenticationBuilder builder, IConfiguration configuration, string sectionName = "Authentication", bool addAuthorizationServices = true)
{
if (addAuthorizationServices)
{
Expand All @@ -74,7 +73,7 @@ public static ISimpleAuthenticationBuilder AddSimpleAuthentication(this Authenti
CheckAddApiKey(builder, configuration.GetSection($"{sectionName}:ApiKey"));
CheckAddBasicAuthentication(builder, configuration.GetSection($"{sectionName}:Basic"));

return new DefaultSimpleAuthenticationBuilder(configuration, builder);
return builder;

static void CheckAddJwtBearer(AuthenticationBuilder builder, IConfigurationSection section)
{
Expand Down

0 comments on commit 746b2cd

Please sign in to comment.