Pushed Authorization Request
POST /oauth/oidc/par
Send the authorization request to TrueVault server to server (RFC 9126), then redirect the browser with only client_id and the returned request_uri. The browser never carries claims, email, phone or ruleset, nothing on the way can edit them, and the authorize URL stays under 200 bytes however many claims you ask for.
Recommended for every confidential client. Public clients have no secret to authenticate the push and use the direct authorization request instead. Optional: require_pushed_authorization_requests is false in the discovery document.
Client authentication
Authenticate the way your client authenticates at the token endpoint - either the Authorization: Basic header (client_secret_basic) or client_id and client_secret in the form body (client_secret_post), never both.
Steps
- Generate PKCE
code_verifierandcode_challenge, plusstateandnonce - POST the authorization parameters here when the person clicks, not at page render
- Redirect the browser to the authorization endpoint with
client_idandrequest_uri - Continue as normal: callback, token exchange, userinfo
Each request_uri works once and expires after 10 minutes. Pushed parameters are deleted when the request_uri is used, or when it expires unused.
Request body
Content type application/x-www-form-urlencoded
Fields
| Field | Type | Required | Description |
|---|---|---|---|
client_id |
string | no | Only when the client authenticates with |
client_secret |
string | no | Only when the client authenticates with |
response_type |
string | yes | Must be One of: |
redirect_uri |
string | yes | Must exactly match a redirect URI registered for the client. |
scope |
string | yes | Space-separated scopes. Must include |
state |
string | yes | Opaque value your application checks on the callback. |
nonce |
string | no | Bound into the |
code_challenge |
string | yes |
|
code_challenge_method |
string | yes | One of: |
claims |
string | no | JSON claims request, e.g. |
ruleset |
string | no | A ruleset enabled on the client. Defaults to the client's default ruleset. |
aobo |
string | no | Delegation uid when acting on behalf of another relying party. |
phone |
string | no | Pre-seed the person's phone number. |
phone_country_code |
string | no | Country code for |
email |
string | no | Pre-seed the person's email address. |
Example request body
{
"client_id": "string",
"client_secret": "string",
"response_type": "code",
"redirect_uri": "string",
"scope": "openid profile",
"state": "string",
"nonce": "string",
"code_challenge": "string",
"code_challenge_method": "S256",
"claims": "{\"true\":[\"trueidentity.valid\"]}",
"ruleset": "string",
"aobo": "string",
"phone": "string",
"phone_country_code": "61",
"email": "string"
}
Responses
| Status | Description |
|---|---|
201 Created | Request stored. Redirect the browser with |
400 Bad Request |
|
401 Unauthorized |
|
405 |
|
Content type application/json
PushedAuthorizationResponse (201)
| Field | Type | Required | Description |
|---|---|---|---|
request_uri |
string | yes | Opaque reference to the pushed request. Single use. Pass it, with |
expires_in |
integer | yes | Seconds the |
Example 201 response
{
"request_uri": "urn:ietf:params:oauth:request_uri:cPkc0bdMi3tYpeEYAPR57ZizsansgCuf",
"expires_in": 600
}Content type application/json
OAuthError (400, 401, 405)
| Field | Type | Required | Description |
|---|---|---|---|
error |
string | no | Error code as defined in RFC 6749. |
error_description |
string | no | Human-readable error description. |
Example 400 response
{
"error": "invalid_grant",
"error_description": "The authorization code has expired or is invalid."
}
Example request
curl --request POST \
--url https://sandbox.truevault.com.au/oauth/oidc/par \
--header 'Content-Type: application/json'