1

Is there a way I can force it to use cookie or modify the timeout span. It keeps going to the IDP every a few clicks or if the session was ideal for less than 3 seconds.

Anders Revsgaard
  • 3,636
  • 1
  • 9
  • 25

1 Answers1

0

The ASP.NET Core relaying party sample applications ASP.NET Core authentication and thereby actually cookies, where the tokens timeout is transferred to being the authentication / cookie lifetime.

If the problem is caused by short living tokens you can set the authentication / cookie lifetime in the saml2AuthnResponse.CreateSession method in the AuthController.AssertionConsumerService.

In a ASP.NET Core application like this:

await saml2AuthnResponse.CreateSession(HttpContext, claimsTransform: (claimsPrincipal) => ClaimsTransform.Transform(claimsPrincipal), lifetime: new TimeSpan(1, 0, 0));
Anders Revsgaard
  • 3,636
  • 1
  • 9
  • 25