-
Notifications
You must be signed in to change notification settings - Fork 35
Concept: Sessions in Jaguar
Session provides a way to store data about a particular set of requests and share that data across those requests. Typical use cases are:
- Store items added to shopping cart in retail application
- Store information about user logged-in to the application
Session data consists of key-value string pairs.
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.
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
is responsible for:
- Parsing session identifier & information from the HTTP request
- Writing session identifier & information to HTTP response
- 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
- Route handler
- Path matching
- Path parameters
- Query parameters
- Serving static files
- Cookies
- Controller
- Parameter binding
- Hot reload
Serialization
Forms
Sessions
Authentication
- Basic authentication
- Form authentication
- JSON authentication
- Authorization
- OAuth
- MongoDb
- PostgreSQL
- MySQL
- Establish connection
- ORM
- Server sent events (SSE)
- Websockets
- systemd
- Docker
- AppEngine