PipedreamHQ / pipedream

Connect APIs, remarkably fast. Free for developers.
https://pipedream.com
Other
8.97k stars 5.27k forks source link

Emarsys #12576

Open pipedream-component-development opened 4 months ago

pipedream-component-development commented 4 months ago

App

Emarsys https://dev.emarsys.com/docs/core-api-reference/12dab89109ded-emarsys-api

sergio-eliot-rodriguez commented 4 months ago

Uses a non standard AUth method that requires a password digest computing, which is kind of a signature in the request:

WSSE Format

The X-WSSE header is generated from your user name and secret, and consists of the following mandatory elements: ... ... ...

Example

The header is a single HTTP header line, broken down into multiple lines for easier readibility:

X-WSSE: UsernameToken Username="customer001", PasswordDigest="ZmI2ZmQ0MDIxYmQwNjcxNDkxY2RjNDNiMWExNjFkZA==", Nonce="d36e316282959a9ed4c89851497a717f", Created="2014-03-20T12:51:45Z"

Computing the Password Digest

Compute the password digest in the following steps:

Generate a random 16-byte nonce in the 32-character hexadecimal format.

Get the current timestamp in ISO 8601 format.

Concatenate the following three values in this order:

nonce + timestamp + secret

Calculate the SHA1 hash value of the concatenated string in hexadecimal format.

Specifically: **> Concatenate the following three values in this order:

nonce + timestamp + secret

Calculate the SHA1 hash value of the concatenated string in hexadecimal format.**