From e842f56caf0a36acc0841582c25de71f37c4885e Mon Sep 17 00:00:00 2001 From: Tudor Stanciu Date: Sat, 26 Jun 2021 21:31:31 +0300 Subject: [PATCH] NDB.Security.Authentication.Identity removed "basic" keyword from code --- ...onExtensions.cs => AuthenticationExtensions.cs} | 14 +++++++------- ...Handler.cs => IdentityAuthenticationHandler.cs} | 4 ++-- .../NDB.Security.Authentication.Identity.csproj | 6 +++--- Notes.txt | 2 +- 4 files changed, 13 insertions(+), 13 deletions(-) rename NDB.Security.Authentication.Identity/{BasicAuthenticationExtensions.cs => AuthenticationExtensions.cs} (61%) rename NDB.Security.Authentication.Identity/{BasicAuthenticationHandler.cs => IdentityAuthenticationHandler.cs} (88%) diff --git a/NDB.Security.Authentication.Identity/BasicAuthenticationExtensions.cs b/NDB.Security.Authentication.Identity/AuthenticationExtensions.cs similarity index 61% rename from NDB.Security.Authentication.Identity/BasicAuthenticationExtensions.cs rename to NDB.Security.Authentication.Identity/AuthenticationExtensions.cs index 39a2fa1..01c8b97 100644 --- a/NDB.Security.Authentication.Identity/BasicAuthenticationExtensions.cs +++ b/NDB.Security.Authentication.Identity/AuthenticationExtensions.cs @@ -6,15 +6,15 @@ using System; namespace NDB.Security.Authentication.Identity { - public static class BasicAuthenticationExtensions + public static class AuthenticationExtensions { - public static IServiceCollection AddBasicAuthentication(this IServiceCollection services, string identityServerBaseAddress) + public static IServiceCollection AddAuthentication(this IServiceCollection services, string identityServerBaseAddress) { - services.AddBasicAuthentication(identityServerBaseAddress, new Services.AuthenticationOptions()); + services.AddAuthentication(identityServerBaseAddress, new Services.AuthenticationOptions()); return services; } - public static IServiceCollection AddBasicAuthentication(this IServiceCollection services, string identityServerBaseAddress, IAuthenticationOptions authenticationOptions) + public static IServiceCollection AddAuthentication(this IServiceCollection services, string identityServerBaseAddress, IAuthenticationOptions authenticationOptions) { Validate(identityServerBaseAddress, authenticationOptions); @@ -22,9 +22,9 @@ namespace NDB.Security.Authentication.Identity services.UseIdentityServices(identityServerBaseAddress); services.AddSingleton(authenticationOptions); - // configure basic authentication - services.AddAuthentication("BasicAuthentication") - .AddScheme("BasicAuthentication", null); + // configure authentication + AuthenticationServiceCollectionExtensions.AddAuthentication(services, "IdentityAuthentication") + .AddScheme("IdentityAuthentication", null); return services; } diff --git a/NDB.Security.Authentication.Identity/BasicAuthenticationHandler.cs b/NDB.Security.Authentication.Identity/IdentityAuthenticationHandler.cs similarity index 88% rename from NDB.Security.Authentication.Identity/BasicAuthenticationHandler.cs rename to NDB.Security.Authentication.Identity/IdentityAuthenticationHandler.cs index c921e48..cc5570a 100644 --- a/NDB.Security.Authentication.Identity/BasicAuthenticationHandler.cs +++ b/NDB.Security.Authentication.Identity/IdentityAuthenticationHandler.cs @@ -11,12 +11,12 @@ using System.Threading.Tasks; namespace NDB.Security.Authentication.Identity { - public class BasicAuthenticationHandler : AuthenticationHandler + public class IdentityAuthenticationHandler : AuthenticationHandler { private readonly IIdentityService _identityService; private readonly IAuthenticationOptions _authenticationOptions; - public BasicAuthenticationHandler(IOptionsMonitor options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, IIdentityService identityService, IAuthenticationOptions authenticationOptions) + public IdentityAuthenticationHandler(IOptionsMonitor options, ILoggerFactory logger, UrlEncoder encoder, ISystemClock clock, IIdentityService identityService, IAuthenticationOptions authenticationOptions) : base(options, logger, encoder, clock) { _identityService = identityService; diff --git a/NDB.Security.Authentication.Identity/NDB.Security.Authentication.Identity.csproj b/NDB.Security.Authentication.Identity/NDB.Security.Authentication.Identity.csproj index e742ff8..6b099e6 100644 --- a/NDB.Security.Authentication.Identity/NDB.Security.Authentication.Identity.csproj +++ b/NDB.Security.Authentication.Identity/NDB.Security.Authentication.Identity.csproj @@ -2,12 +2,12 @@ netstandard2.0 - Add basic authentication handler with inhouse identity server + Add authentication handler with inhouse identity server https://dev.azure.com/tstanciu94/NDB https://dev.azure.com/tstanciu94/NDB Git - NDB BasicAuthentication Identity - 1.0.1 + NDB Authentication Identity + 1.0.2 diff --git a/Notes.txt b/Notes.txt index 1dd6b42..4529395 100644 --- a/Notes.txt +++ b/Notes.txt @@ -22,7 +22,7 @@ dotnet nuget push NDB.Extensions.Swagger.1.0.1.nupkg -k ***REMOVED*** -s http:// dotnet nuget push NDB.Extensions.Http.1.0.0.nupkg -k ***REMOVED*** -s http://stawebsrv:8081/NuGetServer/nuget -dotnet nuget push NDB.Security.Authentication.Identity.1.0.1.nupkg -k ***REMOVED*** -s http://stawebsrv:8081/NuGetServer/nuget +dotnet nuget push NDB.Security.Authentication.Identity.1.0.2.nupkg -k ***REMOVED*** -s http://stawebsrv:8081/NuGetServer/nuget dotnet nuget push NDB.Extensions.Caching.1.0.0.nupkg -k ***REMOVED*** -s http://stawebsrv:8081/NuGetServer/nuget ####################################################################################################################################################### \ No newline at end of file