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
-
@Immutable public class PushedAuthorizationRequest extends AbstractOptionallyAuthenticatedRequest
Pushed authorisation request.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 (draft-ietf-oauth-par-02)
-
-
Constructor Summary
Constructors Constructor Description PushedAuthorizationRequest(URI uri, ClientAuthentication clientAuth, AuthorizationRequest authzRequest)
Creates a new authenticated pushed authorisation request for a confidential client.PushedAuthorizationRequest(URI uri, AuthorizationRequest authzRequest)
Creates a new pushed authorisation request for a public client.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description AuthorizationRequest
getAuthorizationRequest()
Returns the pushed authorisation request.static PushedAuthorizationRequest
parse(HTTPRequest httpRequest)
Parses a pushed authorisation request from the specified HTTP request.HTTPRequest
toHTTPRequest()
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 Detail
-
PushedAuthorizationRequest
public PushedAuthorizationRequest(URI uri, ClientAuthentication clientAuth, AuthorizationRequest authzRequest)
Creates a new authenticated pushed authorisation request for a confidential client.- Parameters:
uri
- The URI of the token endpoint. May benull
if thetoHTTPRequest()
method will not be used.clientAuth
- The client authentication. Must not benull
.authzRequest
- The authorisation request. Must not benull
.
-
PushedAuthorizationRequest
public PushedAuthorizationRequest(URI uri, AuthorizationRequest authzRequest)
Creates a new pushed authorisation request for a public client.- Parameters:
uri
- The URI of the token endpoint. May benull
if thetoHTTPRequest()
method will not be used.authzRequest
- The authorisation request. Must not benull
.
-
-
Method Detail
-
getAuthorizationRequest
public AuthorizationRequest getAuthorizationRequest()
Returns the pushed authorisation request.- Returns:
- The pushed authorisation request.
-
toHTTPRequest
public HTTPRequest toHTTPRequest()
Description copied from interface:Request
Returns the matching HTTP request.- Returns:
- The HTTP request.
-
parse
public static PushedAuthorizationRequest parse(HTTPRequest httpRequest) throws ParseException
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.
-
-