Manifold Signature v0.0.2 ManifoldcoSignature.Signature View Source
Verifies a request signature for the Manifold.co service callbacks.
https://docs.manifold.co/providers#section/Authentication
Link to this section Summary
Types
Endorsement provided as the 3 argument in the x-signature
header
User friendly error reason
Master key provided by Manifold. This should be securely stored in your environment and
passed to validate/2
The canonized request message to verify
Public key provided as the second argument in the x-signature
header
Request signature provied as the first argument in the x-signature
header
Functions
Builds a new signature from the provided request data
Validates the signature (t
) against the master_key
Link to this section Types
Endorsement provided as the 3 argument in the x-signature
header.
User friendly error reason.
Master key provided by Manifold. This should be securely stored in your environment and
passed to validate/2
.
The canonized request message to verify.
Public key provided as the second argument in the x-signature
header.
request_headers() :: [{request_header_key(), request_header_value()}]
Request signature provied as the first argument in the x-signature
header.
t() :: %ManifoldcoSignature.Signature{ date: DateTime.t(), endorsement: endorsement(), message: message(), public_key: public_key(), signature: signature() }
Link to this section Functions
build( request_method(), request_path(), request_query_string(), request_headers(), request_body() ) :: {:ok, t()} | {:error, error_reason()}
Builds a new signature from the provided request data.
validate(t(), master_key(), Keyword.t()) :: :ok | {:error, error_reason()}
Validates the signature (t
) against the master_key
.