Class HttpClientRequestSigner

java.lang.Object
com.mdsol.mauth.DefaultSigner
com.mdsol.mauth.apache.HttpClientRequestSigner
All Implemented Interfaces:
com.mdsol.mauth.Signer

public class HttpClientRequestSigner extends com.mdsol.mauth.DefaultSigner
  • Constructor Details

    • HttpClientRequestSigner

      public HttpClientRequestSigner(com.mdsol.mauth.SignerConfiguration configuration)
    • HttpClientRequestSigner

      public HttpClientRequestSigner(UUID appUUID, String privateKey)
    • HttpClientRequestSigner

      public HttpClientRequestSigner(UUID appUUID, String privateKey, com.mdsol.mauth.util.EpochTimeProvider epochTimeProvider)
    • HttpClientRequestSigner

      public HttpClientRequestSigner(UUID appUUID, PrivateKey privateKey)
    • HttpClientRequestSigner

      public HttpClientRequestSigner(UUID appUUID, PrivateKey privateKey, com.mdsol.mauth.util.EpochTimeProvider epochTimeProvider)
    • HttpClientRequestSigner

      public HttpClientRequestSigner(UUID appUUID, String privateKey, com.mdsol.mauth.util.EpochTimeProvider epochTimeProvider, List<com.mdsol.mauth.MAuthVersion> signVersions)
  • Method Details

    • signRequest

      public void signRequest(org.apache.http.client.methods.HttpUriRequest request) throws com.mdsol.mauth.exceptions.MAuthSigningException
      Convenience method for clients using Apache HttpClient. Generates mAuth headers and includes them into the provided HttpUriRequest. 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:
      request - HttpUriRequest, e.g. HttpGet or HttpPost
      Throws:
      com.mdsol.mauth.exceptions.MAuthSigningException - wraps ParseException and IOException