---
title: SessionContext
description: Provides access to information about in-memory and JWT-based sessions.
component: pinggateway
version: 2026
page_id: pinggateway:reference:SessionContext
canonical_url: https://docs.pingidentity.com/pinggateway/2026/reference/SessionContext.html
revdate: 2026-02-23T12:00:00Z
section_ids:
  Session-properties: Properties
  Session-moreinfo: More information
---

# SessionContext

Provides access to information about in-memory and JWT-based sessions.

To process a single request, consider using [AttributesContext](AttributesContext.html) to transfer transient state between components and prevent PingGateway from creating additional sessions.

PingGateway automatically provides access to the `session` field through the `session` bindings in expressions. For example, to access a username with an expression, use `${session.username}` instead of `${contexts.session.session.username}`

## Properties

The context is named `session`, and is accessible at `${contexts.session}`. The context has the following properties:

* `"session"`: *[java.util.Map](https://docs.oracle.com/en/java/javase/25/docs/api/java.base/java/util/Map.html)*

  A map with the format `Map<String, Object>`, where:

  * Key: Session property name

  * Value: Session property value

  Any object type can be stored in the session.

## More information

[org.forgerock.http.session.SessionContext](../_attachments/apidocs/org/forgerock/http/session/SessionContext.html)
