KutCode.Security.Ldap.DependencyInjection 1.5.0

dotnet add package KutCode.Security.Ldap.DependencyInjection --version 1.5.0
NuGet\Install-Package KutCode.Security.Ldap.DependencyInjection -Version 1.5.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="KutCode.Security.Ldap.DependencyInjection" Version="1.5.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add KutCode.Security.Ldap.DependencyInjection --version 1.5.0
#r "nuget: KutCode.Security.Ldap.DependencyInjection, 1.5.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install KutCode.Security.Ldap.DependencyInjection as a Cake Addin
#addin nuget:?package=KutCode.Security.Ldap.DependencyInjection&version=1.5.0

// Install KutCode.Security.Ldap.DependencyInjection as a Cake Tool
#tool nuget:?package=KutCode.Security.Ldap.DependencyInjection&version=1.5.0

📦 KutCode.Security.Ldap.DependencyInjection

Main package for connection with KutCode.Security.Ldap.WebApi
(API microservice for LDAP auth)

See more info here

❓ Usage

After API deploy, use DependencyInjection to inject LDAP API repository.
Example usage:

using KutCode.Security.Ldap.DependencyInjection;

var builder = WebApplication.CreateBuilder(args);

var config = builder.Configuration.GetRequiredSection("Ldap");
builder.Services
	.AddKutCodeLdapRepository(config, ServiceLifetime.Scoped);

appsettings.json example:

{
  "LdapSecurity": {
    "BaseUrl": "http://localhost:9080",
    "RpcBaseUrl": "http://localhost:11080"
  }
}

gRPC

If you want ot use gRPC to call Ldap security api:

var builder = WebApplication.CreateBuilder(args);
var app = builder.Build();

app.MapKutCodeLdapRpc(new LdapRepositoryInjectionConfiguration {
    BaseUrl = "http://localhost:9080",
    RpcBaseUrl = "http://localhost:9081"
    // You can use the same port for gRPC only if connection is TLS secured!
    // That's because HTTPv2 and HTTPv1 on the same port require TLS.
});
	
app.Run();

And than in any place of your code use:

var response = await new LdapAuthCommand {
		Login = "test", Password = "test"
	}.RemoteExecuteAsync();
Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.5.0 258 2/26/2024
1.2.0 219 2/16/2024
1.1.0 88 2/16/2024