liveBook · Manning

Cookie

As explained in Building Web APIs with ASP.NET Core

Session-cookie authentication stores authentication state on a server-side session and sends a session identifier to the client in a cookie.

Session-cookie authentication keeps authentication state in a server-side session and gives the client a unique sessionId in a cookie. section 9.1.2

The request flow works as follows:

  • Store the user’s authentication information in a key/value service on the web server or an external server or cluster. section 9.1.2
  • Assign the stored session an autogenerated unique sessionId. section 9.1.2
  • Send the sessionId to the browser in a cookie. section 9.1.2
  • Resend the cookie on later requests so the server can retrieve the session and perform authorization checks. section 9.1.2
Figure 9.1 Authentication and authorization flow
09-01

Use the authentication and authorization flow diagram to trace how login state persists across requests. section 9.1.2

How Building Web APIs with ASP.NET Core covers it

How deep it goes
Explains the storage, identifier, cookie, and retrieval flow without detailing framework-specific configuration.
Examples
Uses a login result, a stored user identity, a generated sessionId, and repeated browser requests.
What you can do after
Evaluate how a server preserves login state and identifies users on subsequent requests.
How it connects
Connects authentication with authorization, HTTP headers, bearer tokens, API keys, signatures, and certificates.

Also explained in

Compare how 10 books explain cookie →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Web APIs with ASP.NET Core. The section links point to the parts of the book it draws on.