Package com.mdsol.mauth
Interface Signer
- All Known Implementing Classes:
DefaultSigner
public interface Signer
-
Method Summary
Modifier and TypeMethodDescriptiongenerateRequestHeaders(String httpVerb, String requestPath, byte[] requestPayload, String queryParameters) Generates the mAuth headers from the provided HTTP request data for Mauth V2(and V1) protocol NOTE: mAuth headers are time sensitive.generateRequestHeaders(String httpVerb, String requestPath, InputStream requestPayload, String queryParameters) Generates the mAuth headers from the provided HTTP request data for Mauth V2 or V1 protocol NOTE: mAuth headers are time sensitive.generateRequestHeaders(String httpVerb, String requestPath, String requestPayload) Deprecated.
-
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 bygenerateRequestHeaders(String, String, byte[], String)for Mauth V2 protocolGenerates 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 requestqueryParameters- 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 requestqueryParameters- 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(String, String, byte[], String)for Mauth V2 protocol