Skip to content

Commit b804e58

Browse files
committed
Add optional authentication scheme saml login path.
1 parent a0d10c8 commit b804e58

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/ITfoxtec.Identity.Saml2.MvcCore/Configuration/Saml2ServiceCollectionExtensions.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,12 +9,12 @@ public static class Saml2ServiceCollectionExtensions
99
/// <summary>
1010
/// Add SAML 2.0 configuration.
1111
/// </summary>
12-
public static IServiceCollection AddSaml2(this IServiceCollection services)
12+
public static IServiceCollection AddSaml2(this IServiceCollection services, string loginPath = "/Auth/Login")
1313
{
1414
services.AddAuthentication(Saml2Constants.AuthenticationScheme)
1515
.AddCookie(Saml2Constants.AuthenticationScheme, o =>
1616
{
17-
o.LoginPath = new PathString("/Auth/Login");
17+
o.LoginPath = new PathString(loginPath);
1818
});
1919

2020
return services;

0 commit comments

Comments
 (0)