For Authlete 2.x documentation, see 2.x version.
Introduction
RFC 9126: OAuth 2.0 Pushed Authorization Requests (PAR) is one the most impactful security enhancements to the OAuth2 framework. It allows clients to “push” (submit directly) content of an authorization request to the authorization server in advance, instead of sending it conventionally through a user agent. The PAR specification defines a new endpoint (PAR EP) that accepts the authorization request content. The PAR EP sends back an identifier (request_uri) so that the client can include it in the following authorization request. The segregation of the provisioning of the authorization request content from the authorization request creates one more option to enhance the security, for instance: SPAs (single page applications) can rely on server side to create the authorization request content without disclosing any detail of the authorization request to the browser, or mobile apps can create and send the authorization request content before forwarding it to browser. This article describes an overview of PAR support in Authlete, and instructions to enable it.Implementing PAR EP
In order to support PAR, you have to implement a PAR EP in an authorization server (or an OP on OIDC parlance), and configure PAR settings in Authlete. The PAR EP of the authorization server can employ/pushed_auth_req API of Authlete as a backend. This API has the same design principle as the other endpoints: it allows your authorization server to simply forward the pushed authorization request from a client to Authlete.

/pushed_auth_req API expects the same payload of /auth/authorization API, plus the client authentication. The /pushed_auth_req API will provide content of a pushed authorization response (responseContent) to be sent back to the client. The content includes a request_uri so that the client can use it on making an authorization request.
Sample request and response
The authorization request content pushed from the client to the PAR EP is similar to ones in a usual request to an authorization endpoint, except that the client sends the authorization request using POST method and application/x-www-form-urlencoded media type.The response from Authlete is the action “CREATED” and a requestUri, meaning that the authorization request was provisioned with an identifier as the requestUri value. Authlete also creates responseContent, whose value is intended to be used as a pushed authorization response from the PAR EP to the client.
- Request
- Response
request_uri returned from the PAR EP, the client sends an authorization request to the authorization server via a user agent. On receiving the request, the authorization server makes a request to Authlete’s /auth/authorization API as follows.
PAR configuration on Authlete
Log in to the Authlete Management Console and open Service Settings for your Authlete service to configure it as the backend for the PAR endpoint on the authorization server. In the Pushed Authorization Request (PAR) tab, you can:- Specify whether the usage of PAR is mandatory for every client by toggling the Require PAR option.
- Configure how long a pushed authorization request remains valid (set the duration in seconds).
Pushed Authorization Request config on service level
You can make PAR mandatory for a specific client, even if the Authlete service is not configured to require it. To enable this:
- Open Client Settings for your client.
- Navigate to Endpoints > General > Pushed Authorization Request.
- Toggle the Require PAR switch to enable it.
Flag to force a specific client to use pushed authorization request
Client authentication
An authorization server may authenticate clients on a PAR EP. Authlete applies authentication method settings for a token endpoint to the PAR EP as well. The mechanism is described in the following article. In the Service Settings under the Token tab, you can configure the supported Client Authentication Methods for the token endpoint. Select methods likePRIVATE_KEY_JWT or TLS_CLIENT_AUTH based on your requirements.
To configure:
- Navigate to Endpoints > Token in Service Settings.
- Select the desired authentication methods under Supported Client Authentication Methods.
- Click Save Changes.
Client authentication method on token and PAR endpoint for each client
For the authentication method CLIENT_SECRET_BASIC, the client will be authenticated on the PAR EP using basic HTTP authentication. The authorization server will make a request to Authlete’s /pushed_auth_req API with the credentials submitted from the client, by using the “clientId” and “clientSecret” attributes (check snipped below).