Skip to content

Concept: Sessions in Jaguar

Ravi Teja Gudapati edited this page Jun 17, 2017 · 4 revisions

Session

Session provides a way to store data about a particular set of requests and share that data across those requests. Typical use cases are:

  1. Store items added to shopping cart in retail application
  2. Store information about user logged-in to the application

Session data consists of key-value string pairs.

Session storage

Session data stored on HTTP request

The session data can either be stored in request cookies or headers itself. This is simpler to get going and doesn't need any backend database.

Session data stored on the server

Alternatively, session identifier can be stored on request cookies or headers, while the actual session data is stored in Dart Map or a database (ex: MongoDb, PostgreSQL, Reddis, etc).

SessionManager

SessionManager is responsible for:

  1. Parsing session identifier & information from the HTTP request
  2. Writing session identifier & information to HTTP response
  3. Loading and storing session data from session store

After the session is parsed (usually done through SessionInterceptor, authenticators, authorizers), the session information can be accessed using getInValue method for a given key.

Basics

Serialization

Forms

Sessions

Authentication

  • Basic authentication
  • Form authentication
  • JSON authentication
  • Authorization
  • OAuth

Database

Security

Real time

  • Server sent events (SSE)
  • Websockets

Deployment

  • systemd
  • Docker
  • AppEngine

API Documentation

Clone this wiki locally