Interface Signer

All Known Implementing Classes:
DefaultSigner

public interface Signer
  • Method Details

    • generateRequestHeaders

      @Deprecated Map<String,String> generateRequestHeaders(String httpVerb, String requestPath, String requestPayload) throws com.mdsol.mauth.exceptions.MAuthSigningException
      Deprecated.
      This is used for Mauth V1 protocol only, replaced by generateRequestHeaders(String, String, byte[], String) for Mauth V2 protocol
      Generates the mAuth headers from the provided HTTP request data for Mauth V1. NOTE: mAuth headers are time sensitive. The headers must be verified by the receiving service within 5 minutes of being generated otherwise the request will fail.
      Parameters:
      httpVerb - The HTTP verb of the request, e.g. GET, POST, etc.
      requestPath - The path of the request, not including protocol, host or query parameters.
      requestPayload - The payload of the request
      Returns:
      MAuth headers which should be appended to the request before sending.
      Throws:
      com.mdsol.mauth.exceptions.MAuthSigningException - when request cannot be signed
    • generateRequestHeaders

      Map<String,String> generateRequestHeaders(String httpVerb, String requestPath, byte[] requestPayload, String queryParameters) throws com.mdsol.mauth.exceptions.MAuthSigningException
      Generates the mAuth headers from the provided HTTP request data for Mauth V2(and V1) protocol NOTE: mAuth headers are time sensitive. The headers must be verified by the receiving service within 5 minutes of being generated otherwise the request will fail.
      Parameters:
      httpVerb - The HTTP verb of the request, e.g. GET, POST, etc.
      requestPath - The path of the request, not including protocol, host or query parameters.
      requestPayload - The payload of the request
      queryParameters - The query parameters (URL-encoded)
      Returns:
      MAuth headers which should be appended to the request before sending.
      Throws:
      com.mdsol.mauth.exceptions.MAuthSigningException - when request cannot be signed
    • generateRequestHeaders

      Map<String,String> generateRequestHeaders(String httpVerb, String requestPath, InputStream requestPayload, String queryParameters) throws com.mdsol.mauth.exceptions.MAuthSigningException
      Generates the mAuth headers from the provided HTTP request data for Mauth V2 or V1 protocol NOTE: mAuth headers are time sensitive. The headers must be verified by the receiving service within 5 minutes of being generated otherwise the request will fail.
      Parameters:
      httpVerb - The HTTP verb of the request, e.g. GET, POST, etc.
      requestPath - The path of the request, not including protocol, host or query parameters.
      requestPayload - The payload of the request
      queryParameters - The query parameters (URL-encoded)
      Returns:
      MAuth headers which should be appended to the request before sending.
      Throws:
      com.mdsol.mauth.exceptions.MAuthSigningException - when request cannot be signed