Class 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 the resourceSignatureKeyId 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 Detail

      • ResourceServerSignatureRequest

        public ResourceServerSignatureRequest()
    • Method Detail

      • getRequestSignature

        public String getRequestSignature()
        Get the Signature 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 the Signature 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 the key of the entry and the value of the header is the value 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 the key of the entry and the value of the header is the value of the entry.
        Returns:
        this object.
      • getMessage

        public String getMessage()
        Get 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.
        Returns:
        HTTP message response body.
      • setMessage

        public ResourceServerSignatureRequest setMessage​(String message)
        Set 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.
        Returns:
        this object.
      • getStatus

        public int getStatus()
        Get the HTTP status code of the response.
        Returns:
        The numeric HTTP status code.