---
title: Expressions for OAuth and OpenID Connect uses cases
description: You can use OGNL expressions to retrieve various request-attributes through the HTTP Request Java object.
component: pingfederate
version: 13.1
page_id: pingfederate:administrators_reference_guide:pf_express_oauth_openid_connect_uses_cases
canonical_url: https://docs.pingidentity.com/pingfederate/13.1/administrators_reference_guide/pf_express_oauth_openid_connect_uses_cases.html
llms_txt: https://docs.pingidentity.com/pingfederate/llms.txt
docs_for_agents: https://developer.pingidentity.com/build-with-ai/docs-for-agents.md
revdate: July 5, 2022
section_ids:
  client-authentication-method: Client authentication method
  private-key-json-web-token-jwt: Private key JSON web token (JWT)
  related-links: Related links
---

# Expressions for OAuth and OpenID Connect uses cases

You can use OGNL expressions to retrieve various request-attributes through the HTTP Request Java object.

## Client authentication method

The following sample expression retrieves the authentication method that a client uses. This sample expression is applicable to all clients.

```
#this.get("context.HttpRequest").getObjectValue().getAttribute("com.pingidentity.oauth.client.authnType")
```

## Private key JSON web token (JWT)

In the following sample expressions, the former retrieves a claim value from the private key JWT with which a client authenticates and the latter retrieves the private key JWT itself. They are only applicable to clients using the private\_key\_jwt authentication method.

* Retrieving the `aud` claim value

```
#claims = #this.get("context.HttpRequest").getObjectValue().getAttribute("com.pingidentity.oauth.client.jwtClaimsMap"),
#claims.get("aud")
```

* Retrieving the entire private key JWT

```
#this.get("context.HttpRequest").getObjectValue().getParameter("client_assertion")
```

## Related links

* [Configuring access token fulfillment](help_oauthuserkey2accesstokenmappingtasklet_oauthsource2targetmappingstate.html)

* [The OGNL language guide from Apache Commons](https://commons.apache.org/dormant/commons-ognl/language-guide.html)
