Cookies in IdentityServer4

Can someone explain the purpose of the cookies that are sent to the user's browser after successfully logging in to Identity Server4. Also I have three smaller related questions below.

The client uses cookie middleware in the ASP.NET core defined in the Startup.cs file .

app.UseCookieAuthentication()

It’s clear which Identity Server tokens are created and which cookies create the ASP.NET Core middleware, but I'm not sure what content each cookie contains.

ASP.NET Core middleware decided to create cookie pieces, probably due to the size of the cookie (4050B + 865B).

I am trying to find a way to decrypt cookies to read values ​​using the data protection API provided by ASP.NET Core with no luck.

  • idsvr
  • idsvr.session
  • .AspNetCore.coookie
  • .AspNetCore.coookieC1
  • .AspNetCore.coookieC2
  • .AspNetCore.Antiforgery.

Screenshot of developer tools in Internet Explorer

  • Which cookie contains id_token, access_token issued by Identity Server?
  • Can a CookieName be used to change the name of a cookie created by ASP.NET Core middleware if different clients use the same cookie name or do they need separate session cookies?
  • Can I decrypt Identity Server cookies using the data protection API ?
+4
source share
1
  • AFAIK id_token, access_token cookie. cookie (cookie, ASP.NET Core), . 3 OpenID connect OWIN. asp.net .

  • cookie, . , cookie , .

  • .

0

Source: https://habr.com/ru/post/1660312/


All Articles