Manifold Signature v1.0.1 ManifoldcoSignature View Source

Verifies incoming provider callback requests from the Manifold.co service.

https://docs.manifold.co/providers#section/Authentication

Link to this section Summary

Types

User friendly error reason

Master key provided by Manifold. This should be securely stored in your environment and passed to validate/6 as the last argument

The raw request body

Tuple form of the request headers, the default structure provided from Plug.Conn.headers

String representation of the method, case insensitive. This library will normalize the case as described in the Manifold docs

The raw request path with a leading /

String representation of the URL query string (without the ?). This library will normalize the order of the parameters as described in the Manifold documentation

Option that can be passed to verify/6

Functions

Verifies the request. Each request part is required to build the canoncical form of the request and the master_key should be securetly stored in your environment and passed as the last argument. The master_key is provided by Manifold

Link to this section Types

Link to this type error_reason() View Source
error_reason() :: binary()

User friendly error reason.

Link to this type master_key() View Source
master_key() :: binary()

Master key provided by Manifold. This should be securely stored in your environment and passed to validate/6 as the last argument.

Link to this type request_body() View Source
request_body() :: nil | binary()

The raw request body.

Link to this type request_header_key() View Source
request_header_key() :: binary()
Link to this type request_header_value() View Source
request_header_value() :: binary()
Link to this type request_headers() View Source
request_headers() :: [{request_header_key(), request_header_value()}]

Tuple form of the request headers, the default structure provided from Plug.Conn.headers.

Link to this type request_method() View Source
request_method() :: binary()

String representation of the method, case insensitive. This library will normalize the case as described in the Manifold docs.

Link to this type request_path() View Source
request_path() :: binary()

The raw request path with a leading /.

Link to this type request_query_string() View Source
request_query_string() :: nil | binary()

String representation of the URL query string (without the ?). This library will normalize the order of the parameters as described in the Manifold documentation.

Link to this type verify_opt() View Source
verify_opt() :: {:master_key, master_key()}

Option that can be passed to verify/6.

Link to this section Functions

Link to this function verify(method, path, query_string, headers, body, opts \\ []) View Source

Verifies the request. Each request part is required to build the canoncical form of the request and the master_key should be securetly stored in your environment and passed as the last argument. The master_key is provided by Manifold.