@Immutable public final class RequestObjectPOSTRequest extends AbstractOptionallyAuthenticatedRequest
Example request object POST request:
POST /requests HTTP/1.1 Host: c2id.com Content-Type: application/jws Content-Length: 1288 eyJhbGciOiJSUzI1NiIsImtpZCI6ImsyYmRjIn0.ew0KICJpc3MiOiA (... abbreviated for brevity ...) zCYIb_NMXvtTIVc1jpspnTSD7xMbpL-2QgwUsAlMGzw
Related specifications:
Constructor | Description |
---|---|
RequestObjectPOSTRequest(URI uri,
com.nimbusds.jwt.JWT requestObject) |
Creates a new request object POST request.
|
RequestObjectPOSTRequest(URI uri,
TLSClientAuthentication tlsClientAuth,
net.minidev.json.JSONObject requestJSONObject) |
Creates a new request object POST request where the parameters are
submitted as plain JSON object, and the client authenticates by
means of mutual TLS.
|
Modifier and Type | Method | Description |
---|---|---|
net.minidev.json.JSONObject |
getRequestJSONObject() |
Returns the request object as plain JSON object.
|
com.nimbusds.jwt.JWT |
getRequestObject() |
Returns the request object as JWT.
|
TLSClientAuthentication |
getTLSClientAuthentication() |
Returns the mutual TLS client authentication.
|
static RequestObjectPOSTRequest |
parse(HTTPRequest httpRequest) |
Parses a request object POST request from the specified HTTP
request.
|
HTTPRequest |
toHTTPRequest() |
Returns the matching HTTP request.
|
getClientAuthentication
getEndpointURI
public RequestObjectPOSTRequest(URI uri, com.nimbusds.jwt.JWT requestObject)
uri
- The URI of the request object endpoint. May be
null
if the toHTTPRequest()
method will not be used.requestObject
- The request object. Must not be null
.public RequestObjectPOSTRequest(URI uri, TLSClientAuthentication tlsClientAuth, net.minidev.json.JSONObject requestJSONObject)
uri
- The URI of the request object endpoint. May
be null
if the
toHTTPRequest()
method will not be
used.tlsClientAuth
- The mutual TLS client authentication. Must
not be null
.requestJSONObject
- The request parameters as plain JSON
object. Must not be null
.public com.nimbusds.jwt.JWT getRequestObject()
null
if the request
parameters are specified as plain JSON object
instead.public net.minidev.json.JSONObject getRequestJSONObject()
null
if the request object is specified as a
JWT
.public TLSClientAuthentication getTLSClientAuthentication()
public HTTPRequest toHTTPRequest()
Request
public static RequestObjectPOSTRequest parse(HTTPRequest httpRequest) throws ParseException
httpRequest
- The HTTP request. Must not be null
.ParseException
- If the HTTP request couldn't be parsed to a
request object POST request.Copyright © 2019 Connect2id Ltd.. All rights reserved.