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/signAPI.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
rsResponseSignedflag set to true and theresourceSignatureKeyIdset 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
Signatureheader 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-Digestof 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.StringgetMessage()Get the HTTP message response body.StringgetRequestSignature()Get theSignatureheader value from the request.intgetStatus()Get the HTTP status code of the response.ResourceServerSignatureRequestsetHeaders(Pair[] headers)Set the HTTP response headers, all will be included in the signature.ResourceServerSignatureRequestsetMessage(String message)Set the HTTP message response body.ResourceServerSignatureRequestsetRequestSignature(String requestSignature)Set theSignatureheader value from the request.ResourceServerSignatureRequestsetStatus(int status)Set the HTTP status code of the response.
-
-
-
Method Detail
-
getRequestSignature
public String getRequestSignature()
Get theSignatureheader 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 theSignatureheader value from the request. All signatures in this header will be included in the output signature.- Returns:
thisobject.
-
getHeaders
public Pair[] getHeaders()
Get the HTTP response headers, all will be included in the signature. The name of the header is thekeyof the entry and the value of the header is thevalueof 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 thekeyof the entry and the value of the header is thevalueof the entry.- Returns:
thisobject.
-
getMessage
public String getMessage()
Get the HTTP message response body. If included, the response will include theContent-Digestof 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-Digestof the message and the digest will be covered in the signature.- Returns:
thisobject.
-
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:
thisobject.
-
-