Sustainsys / Saml2

Saml2 Authentication services for ASP.NET
Other
940 stars 606 forks source link

Changing Default Login Endpoint #1422

Closed innotech-banha closed 6 months ago

innotech-banha commented 6 months ago

I'm using the package Sustainsys.Saml2.AspNetCore2 (version 2.9.2) for .NET 6.

I have a successfully gotten the package to work, authenticating and authorizing a user to access my web API. But now I'm facing a situation that I cannot find a solution for in the existing documentation, which is how to modify the default login address that a user is redirected to when trying to access an endpoint that requires authorization, while they have not yet logged themselves in. I'm being reidrected to the endpoint "/Account/Login". Is it possible to modify this?

On that same note, is it also possible to customize the endpoint for when a user is denied access?

AndersAbel commented 6 months ago

Those options are handled by the cookie scheme and can be configured.

innotech-banha commented 6 months ago

Oh, I see! Thank you very much! That seems to definitely be what I needed, much appreciated! =) And happy holidays!