@alliedpayment/authenticator

Timestamp authenticator to sign HTTP requests for Allied REST api.

Usage no npm install needed!

<script type="module">
  import alliedpaymentAuthenticator from 'https://cdn.skypack.dev/@alliedpayment/authenticator';
</script>

README

authenticator

Timestamp authenticator to sign HTTP requests for Allied REST api.

Public / Private Key Required.

Usage

const config = {
  publicKey: 'PUBLICKEY',
  privateKey: 'PRIVATEKEY',
  api: 'https://api.demo.alliedpayment.com',
  domain: 'ALLIED',
  username: 'support',
  onBehalfOf: undefined // optional
};
const Authenticator = require('@alliedpayment/authenticator');
const authenticator = new Authenticator(config);
const header = authenticator.sign('url/to/resource');