---
title: AttributesContext
description: Reference for AttributesContext, which provides a map of transient per-request attributes accessible in PingGateway expressions
component: pinggateway
version: 2026
page_id: pinggateway:reference:AttributesContext
canonical_url: https://docs.pingidentity.com/pinggateway/2026/reference/AttributesContext.html
llms_txt: https://docs.pingidentity.com/pinggateway/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: 2026-06-01T16:50:04Z
section_ids:
  Attributes-properties: Properties
  Attributes-moreinfo: More information
---

# AttributesContext

Provides a map for request attributes. When PingGateway processes a single request, it injects transient state information about the request into this context. Attributes stored when processing one request aren't accessible when processing a subsequent request.

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

Use [SessionContext](SessionContext.html) to maintain state between successive requests from the same logical client.

## Properties

The context is named `attributes`, and is accessible at `${attributes}`. The context has the following property:

* `"attributes"`: [map](preface.html#definition-map)

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

  * Key: Attribute name

  * Value: Attribute value

Cannot be null.

## More information

[org.forgerock.services.context.AttributesContext](../_attachments/apidocs/org/forgerock/services/context/AttributesContext.html)
