Package com.nimbusds.oauth2.sdk
Class PushedAuthorizationRequest
java.lang.Object
com.nimbusds.oauth2.sdk.AbstractRequest
com.nimbusds.oauth2.sdk.AbstractOptionallyAuthenticatedRequest
com.nimbusds.oauth2.sdk.PushedAuthorizationRequest
Pushed authorisation request (PAR).
Example HTTP request:
POST /as/par HTTP/1.1 Host: as.example.com Content-Type: application/x-www-form-urlencoded Authorization: Basic czZCaGRSa3F0Mzo3RmpmcDBaQnIxS3REUmJuZlZkbUl3 response_type=code &client_id=s6BhdRkqt3 &state=af0ifjsldkj &redirect_uri=https%3A%2F%2Fclient.example.org%2Fcb
Related specifications:
- OAuth 2.0 Pushed Authorization Requests (RFC 9126)
-
Constructor Summary
ConstructorsConstructorDescriptionPushedAuthorizationRequest
(URI endpoint, ClientAuthentication clientAuth, AuthorizationRequest authzRequest) Creates a new authenticated pushed authorisation request for a confidential client.PushedAuthorizationRequest
(URI endpoint, AuthorizationRequest authzRequest) Creates a new pushed authorisation request for a public client. -
Method Summary
Modifier and TypeMethodDescriptionReturns the pushed authorisation request.static PushedAuthorizationRequest
parse
(HTTPRequest httpRequest) Parses a pushed authorisation request from the specified HTTP request.Returns the matching HTTP request.Methods inherited from class com.nimbusds.oauth2.sdk.AbstractOptionallyAuthenticatedRequest
getClientAuthentication
Methods inherited from class com.nimbusds.oauth2.sdk.AbstractRequest
getEndpointURI
-
Constructor Details
-
PushedAuthorizationRequest
public PushedAuthorizationRequest(URI endpoint, ClientAuthentication clientAuth, AuthorizationRequest authzRequest) Creates a new authenticated pushed authorisation request for a confidential client.- Parameters:
endpoint
- The URI of the PAR endpoint. May benull
if thetoHTTPRequest()
method is not going to be used.clientAuth
- The client authentication. Must not benull
.authzRequest
- The authorisation request. Must not benull
.
-
PushedAuthorizationRequest
Creates a new pushed authorisation request for a public client.- Parameters:
endpoint
- The URI of the PAR endpoint. May benull
if thetoHTTPRequest()
method is not going to be used.authzRequest
- The authorisation request. Must not benull
.
-
-
Method Details
-
getAuthorizationRequest
Returns the pushed authorisation request.- Returns:
- The pushed authorisation request.
-
toHTTPRequest
Description copied from interface:Request
Returns the matching HTTP request.- Returns:
- The HTTP request.
-
parse
Parses a pushed authorisation request from the specified HTTP request.- Parameters:
httpRequest
- The HTTP request. Must not benull
.- Returns:
- The pushed authorisation request.
- Throws:
ParseException
- If the HTTP request couldn't be parsed to a pushed authorisation request.
-