admin管理员组

文章数量:1297126

I want to know where is the expiration in the cookies with ITfoxtec.

I belived that the expiration in the cookie was in:

Dim cookie As HttpCookie = Request.Cookies("FedAuth")
cookie.Expires

But the time is not correct. I want to know where is the expiration in the cookie.

I want to verify the expiration. Or there are not a way that I can see the expiration cookie.

Edit:

I know how many time is the expiration, but I need get the value in my program, because I don´t know the time.

How can I access to this value?

I want to know where is the expiration in the cookies with ITfoxtec.

I belived that the expiration in the cookie was in:

Dim cookie As HttpCookie = Request.Cookies("FedAuth")
cookie.Expires

But the time is not correct. I want to know where is the expiration in the cookie.

I want to verify the expiration. Or there are not a way that I can see the expiration cookie.

Edit:

I know how many time is the expiration, but I need get the value in my program, because I don´t know the time.

How can I access to this value?

Share Improve this question edited Feb 12 at 14:52 Carlos Alfredo Tejeda Araujo asked Feb 11 at 17:37 Carlos Alfredo Tejeda AraujoCarlos Alfredo Tejeda Araujo 212 bronze badges 2
  • You can not read this info from the cookies that were sent back to your server in a client's request. The only information the client sends, is cookiename=cookievalue. – C3roe Commented Feb 12 at 12:05
  • But, How can I access to these value? I need to get the value because I need an alert the expiration. – Carlos Alfredo Tejeda Araujo Commented Feb 12 at 14:53
Add a comment  | 

1 Answer 1

Reset to default 0

You can optionally specify the session/cookie timeout in the lifetime parameter in the CreateSession method. The session timeout is set to the SAML 2.0 authn response token timeout if not specified.

await saml2AuthnResponse.CreateSession(HttpContext, claimsTransform: ClaimsTransform.Transform, lifetime: new TimeSpan(2 ,0, 0));

Sample code: https://github/ITfoxtec/ITfoxtec.Identity.Saml2/blob/main/test/TestWebAppCore/Controllers/AuthController.cs#L77

本文标签: Where is the expires time cookie in ITfoxtec SAML2Stack Overflow