Sustainsys / Saml2

Saml2 Authentication services for ASP.NET
Other
959 stars 602 forks source link

.Net Core 2.x #984

Closed BrianLytle closed 6 years ago

BrianLytle commented 6 years ago

Has anyone successfully implemented this with .Net Core 2.x?

sunilrav commented 6 years ago

I am having an issue with this too. Currently, stuck on this.

warning NU1701: Package 'Sustainsys.Saml2.AspNetCore2 0.24.0' was restored using '.NETFramework,Version=v4.6.1' instead of the project target framework '.NETCoreApp,Version=v2.1'. This package may not be fully compatible with your project.

ftavares commented 6 years ago

For Core 2.x use the version 2.0 preview

BrianLytle commented 6 years ago

Can you be more specific? How do I get that version?

~ Brian

On Fri, Jun 29, 2018 at 3:42 AM Fabio Tavares notifications@github.com wrote:

For Core 2.x use the version 2.0 preview

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Sustainsys/Saml2/issues/984#issuecomment-401275358, or mute the thread https://github.com/notifications/unsubscribe-auth/AQYhAe0UnJ7Dt8uir4FZPYZllR3DN_kBks5uBdpngaJpZM4U7l2C .

ftavares commented 6 years ago

On Visual Studio when you are searching for a nuget package you have a option to Include PreReleases and then you will have this version available.

Or you can do it through .Net CLI or Nuget CLI : https://www.nuget.org/packages/Sustainsys.Saml2/2.0.0-preview01

BrianLytle commented 6 years ago

Ahhhh...Thanks!

~ Brian

On Fri, Jun 29, 2018 at 10:48 AM Fabio Tavares notifications@github.com wrote:

On Visual Studio when you are searching for a nuget package you have a option to Include PreReleases and then you will have this version available.

Or you can do it through .Net CLI or Nuget CLI : https://www.nuget.org/packages/Sustainsys.Saml2/2.0.0-preview01

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/Sustainsys/Saml2/issues/984#issuecomment-401377268, or mute the thread https://github.com/notifications/unsubscribe-auth/AQYhAaJoQDhq6duNTPKgsGGOslyhiXviks5uBj4sgaJpZM4U7l2C .

timhenn commented 6 years ago

@BrianLytle , Were you able to implement a solution using either 0.24.0 or the 2.0.0 preview? I'd love to see some of the key configuration code and the postback handler. I've had no success loading the SAML response I'm getting back.

Tim

BrianLytle commented 6 years ago

I gave up on it.

My client purchased a ComponentSpace product. I am now using that.

~ Brian

On Wed, Jul 11, 2018 at 9:04 PM timhenn notifications@github.com wrote:

@BrianLytle https://github.com/BrianLytle , Were you able to implement a solution using either 0.24.0 or the 2.0.0 preview? I'd love to see some of the key configuration code and the postback handler. I've had no success loading the SAML response I'm getting back.

Tim

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/Sustainsys/Saml2/issues/984#issuecomment-404357061, or mute the thread https://github.com/notifications/unsubscribe-auth/AQYhAQ7iIC57xdfo3tbJkpWL28Cevnicks5uFqCGgaJpZM4U7l2C .

kwaazaar commented 6 years ago

I hear others using ComponentSpace as well. I don't get the code on this library: for AzureAD or ADFS everything works with just a few lines of code. For SAML2 this seems to be impossible...

timhenn commented 6 years ago

Thanks for the response, I'm already moving down the ComponentSpace direction as I have very limited time to get things working. I suspected the code I inherited never worked and thats turning out to be true.

Red-F commented 6 years ago

The 2.0.0-preview01 version has a dependency on .Net Framework 4.5 Microsoft.IdentityModel.Tokens.Saml.

This effectively prevents using the package within Linux based containers.

blushingpenguin commented 6 years ago

according to https://www.nuget.org/packages/Microsoft.IdentityModel.Tokens.Saml/

.NETFramework 4.5 Microsoft.IdentityModel.Tokens (>= 5.2.4) Microsoft.IdentityModel.Xml (>= 5.2.4)

.NETFramework 4.5.1 Microsoft.IdentityModel.Tokens (>= 5.2.4) Microsoft.IdentityModel.Xml (>= 5.2.4)

.NETStandard 1.4 Microsoft.IdentityModel.Tokens (>= 5.2.4) Microsoft.IdentityModel.Xml (>= 5.2.4) NETStandard.Library (>= 1.6.1)

so it should work fine with .NETStandard 2.0 without pulling in .Net Framework 4.5. What exactly is the issue you are encountering?

Red-F commented 6 years ago

Thanks for the fast reply. I have to re-create my initial setup. Since I am about to leave for two weeks that will have to wait. I get back on this when I'm at work again.

lol768 commented 6 years ago

FWIW I've had this 'working' in production w/ .NET Core 2 for a few months. I ended up having to fork the netstandard branch (https://github.com/lol768/Saml2/commit/370e90a196be9f7aa6435d014dabbadb0899f315) to fix some race conditions (missing await keywords :neutral_face:) and republishing to NuGet...

However I've not been happy with it since that. It's a preview, and it very much feels like it. It doesn't play very nice with other auth middleware, in my experience, and the repo itself feels abandoned.

I'm now going down the ComponentSpace route and have been pretty impressed so far - implemented what took me a week with this library in a little over an hour.