This page is for Authlete 2.x. For current (3.0) documentation, see this page.
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, in advance of sending conventional one (via a user agent indirectly), to an authorization server. The PAR specification defines an 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.
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
PAR configuration on Authlete
Under the Service Owner Console, the administrator can configure an Authlete service to work as a backend of the PAR EP on the authorization server, for how long a pushed authorization request will be valid, and if the usage of PAR is mandatory for every client.
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. Under the Developer Console, you can find “Client Authentication Method” under “Authorization” tab of each client.\