This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* NODE JS example of creating a HTTP Authentication: MAC Access Authentication with SHA-256 | |
* https://tools.ietf.org/html/draft-ietf-oauth-v2-http-mac-00 | |
*/ | |
const crypto = require('crypto'); | |
const baseURL = 'https://example.com'; | |
const serverId = 'SERVER-PROVIDED-ID'; | |
const secretKey = 'SUPER-SECRET-BASE64-KEY'; | |
const issuedKeyAt = 1557794619; | |
const randomString = 'WINTERBOOTS'; |