Class ResourceServerSignatureRequest
- java.lang.Object
-
- com.authlete.common.dto.ResourceServerSignatureRequest
-
- All Implemented Interfaces:
Serializable
public class ResourceServerSignatureRequest extends Object implements Serializable
Request to Authlete's/api/rs/sign
API.The resource server can use this utility to sign responses using HTTP Message Signatures defined in draft-ietf-httpbis-message-signatures as profiled by Financial-grade API: HTTP Signing Requirements.
To use this feature, a service is configured with the
rsResponseSigned
flag set to true and theresourceSignatureKeyId
set to the key ID of one of the keys in the service's registered JWKS. This key will be used to create an HTTP Message Signature on the input parameters.requestSignature
(REQUIRED)-
The
Signature
header value from the request to the RS. All signatures in this header will be included in the output signature. status
(REQUIRED)-
The HTTP status code of the response.
headers
(REQUIRED)-
The HTTP response headers, all will be included in the output signature.
message
(OPTIONAL)-
The HTTP message response body. If included, the response will include the
Content-Digest
of the message and the digest will be covered in the signature.
- Since:
- 3.38, Authlete 2.3
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ResourceServerSignatureRequest()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Pair[]
getHeaders()
Get the HTTP response headers, all will be included in the signature.String
getMessage()
Get the HTTP message response body.String
getRequestSignature()
Get theSignature
header value from the request.int
getStatus()
Get the HTTP status code of the response.ResourceServerSignatureRequest
setHeaders(Pair[] headers)
Set the HTTP response headers, all will be included in the signature.ResourceServerSignatureRequest
setMessage(String message)
Set the HTTP message response body.ResourceServerSignatureRequest
setRequestSignature(String requestSignature)
Set theSignature
header value from the request.ResourceServerSignatureRequest
setStatus(int status)
Set the HTTP status code of the response.
-
-
-
Method Detail
-
getRequestSignature
public String getRequestSignature()
Get theSignature
header value from the request. All signatures in this header will be included in the output signature.- Returns:
- The formatted Signature header value.
-
setRequestSignature
public ResourceServerSignatureRequest setRequestSignature(String requestSignature)
Set theSignature
header value from the request. All signatures in this header will be included in the output signature.- Returns:
this
object.
-
getHeaders
public Pair[] getHeaders()
Get the HTTP response headers, all will be included in the signature. The name of the header is thekey
of the entry and the value of the header is thevalue
of the entry.- Returns:
- The response headers.
-
setHeaders
public ResourceServerSignatureRequest setHeaders(Pair[] headers)
Set the HTTP response headers, all will be included in the signature. The name of the header is thekey
of the entry and the value of the header is thevalue
of the entry.- Returns:
this
object.
-
getMessage
public String getMessage()
Get the HTTP message response body. If included, the response will include theContent-Digest
of the message and the digest will be covered in the signature.- Returns:
- HTTP message response body.
-
setMessage
public ResourceServerSignatureRequest setMessage(String message)
Set the HTTP message response body. If included, the response will include theContent-Digest
of the message and the digest will be covered in the signature.- Returns:
this
object.
-
getStatus
public int getStatus()
Get the HTTP status code of the response.- Returns:
- The numeric HTTP status code.
-
setStatus
public ResourceServerSignatureRequest setStatus(int status)
Set the HTTP status code of the response.- Returns:
this
object.
-
-