From 826da5d6307006a776aa052861013435104690c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=90=D0=BB=D0=B5=D0=BA=D1=81=D0=B5=D0=B9=20=D0=9F=D1=8B?= =?UTF-8?q?=D0=B6=D0=BE=D0=B2?= Date: Fri, 12 Apr 2024 12:02:38 +0300 Subject: [PATCH] add option. Update sdk and lib --- Api.Client/Api.Client.csproj | 2 +- .../IdentityServer.LdapExtension.Unit.csproj | 2 +- .../IdentityServer.LdapExtension.csproj | 55 +++++++++--------- IdentityServer.LdapExtension/LdapService.cs | 3 +- MvcVueClient/MvcVueClient.csproj | 2 +- Sample/Api/Api.csproj | 2 +- Sample/Client/MvcClient.csproj | 2 +- .../QuickstartIdentityServer412.csproj | 58 +++++++++---------- 8 files changed, 64 insertions(+), 62 deletions(-) diff --git a/Api.Client/Api.Client.csproj b/Api.Client/Api.Client.csproj index 56b787a..42a9e6b 100644 --- a/Api.Client/Api.Client.csproj +++ b/Api.Client/Api.Client.csproj @@ -2,7 +2,7 @@ Exe - net5.0 + net6.0 diff --git a/IdentityServer.LdapExtension.Unit/IdentityServer.LdapExtension.Unit.csproj b/IdentityServer.LdapExtension.Unit/IdentityServer.LdapExtension.Unit.csproj index b02eb9f..f775d54 100644 --- a/IdentityServer.LdapExtension.Unit/IdentityServer.LdapExtension.Unit.csproj +++ b/IdentityServer.LdapExtension.Unit/IdentityServer.LdapExtension.Unit.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 false diff --git a/IdentityServer.LdapExtension/IdentityServer.LdapExtension.csproj b/IdentityServer.LdapExtension/IdentityServer.LdapExtension.csproj index 579cb76..e5ebfd3 100644 --- a/IdentityServer.LdapExtension/IdentityServer.LdapExtension.csproj +++ b/IdentityServer.LdapExtension/IdentityServer.LdapExtension.csproj @@ -1,32 +1,33 @@  - - net5.0;netcoreapp3.1 - Nordès Ménard-Lamarre - 2.1.14 - HoNoSoFt - Extension for IdentityServer 4 in order to use LDAP as a plugin. It is also extensible enough in order to use custom LDAP schema such as OpenLdap or Active Directory. - 1.0.0.0 - 1.0.0.0 - true - true - https://github.com/Nordes/IdentityServer4.LdapExtension/blob/master/LICENSE - https://github.com/Nordes/IdentityServer4.LdapExtension/ - Please visit the [GitHub repository](https://github.com/Nordes/IdentityServer4.LdapExtension/) for more details. - https://www.honosoft.com/img/logo.png - Nordès Ménard-Lamarre - https://github.com/Nordes/IdentityServer4.LdapExtension/ - IdentityServer4, Ldap, OpenLdap, ActiveDirectory - true - true - - + + net6.0 + Nordès Ménard-Lamarre + 2.1.14 + HoNoSoFt + Extension for IdentityServer 4 in order to use LDAP as a plugin. It is also extensible enough in order to use custom LDAP schema such as OpenLdap or Active Directory. + 1.0.0.0 + 1.0.0.0 + true + true + https://github.com/Nordes/IdentityServer4.LdapExtension/blob/master/LICENSE + https://github.com/Nordes/IdentityServer4.LdapExtension/ + Please visit the [GitHub repository](https://github.com/Nordes/IdentityServer4.LdapExtension/) for more details. + https://www.honosoft.com/img/logo.png + Nordès Ménard-Lamarre + https://github.com/Nordes/IdentityServer4.LdapExtension/ + IdentityServer4, Ldap, OpenLdap, ActiveDirectory + true + true + + - - - - - - + + + + + + + diff --git a/IdentityServer.LdapExtension/LdapService.cs b/IdentityServer.LdapExtension/LdapService.cs index 5fb851d..bd534da 100644 --- a/IdentityServer.LdapExtension/LdapService.cs +++ b/IdentityServer.LdapExtension/LdapService.cs @@ -158,7 +158,8 @@ public TUser FindUser(string username, string domain) // Could become async foreach (var matchConfig in allSearcheable) { - using var ldapConnection = new LdapConnection { SecureSocketLayer = matchConfig.Ssl }; + var options = new LdapConnectionOptions().ConfigureRemoteCertificateValidationCallback((_, _, _, _) => true); + using var ldapConnection = new LdapConnection(options) { SecureSocketLayer = matchConfig.Ssl }; ldapConnection.Connect(matchConfig.Url, matchConfig.FinalLdapConnectionPort); ldapConnection.Bind(matchConfig.BindDn, matchConfig.BindCredentials); diff --git a/MvcVueClient/MvcVueClient.csproj b/MvcVueClient/MvcVueClient.csproj index b21efab..236d110 100644 --- a/MvcVueClient/MvcVueClient.csproj +++ b/MvcVueClient/MvcVueClient.csproj @@ -1,6 +1,6 @@ - net5.0 + net6.0 true diff --git a/Sample/Api/Api.csproj b/Sample/Api/Api.csproj index d99959e..40a51c7 100644 --- a/Sample/Api/Api.csproj +++ b/Sample/Api/Api.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 diff --git a/Sample/Client/MvcClient.csproj b/Sample/Client/MvcClient.csproj index e172a80..9f4671f 100644 --- a/Sample/Client/MvcClient.csproj +++ b/Sample/Client/MvcClient.csproj @@ -1,7 +1,7 @@  - net5.0 + net6.0 true diff --git a/Sample/IdentityServer/QuickstartIdentityServer412.csproj b/Sample/IdentityServer/QuickstartIdentityServer412.csproj index 7295825..1fcc865 100644 --- a/Sample/IdentityServer/QuickstartIdentityServer412.csproj +++ b/Sample/IdentityServer/QuickstartIdentityServer412.csproj @@ -1,32 +1,32 @@ - - - - net5.0 - InProcess - - - - - - - - - - - - - - - - - - - - - - - + + + + net6.0 + InProcess + + + + + + + + + + + + + + + + + + + + + + + - + \ No newline at end of file