Skip to content

Instantly share code, notes, and snippets.

View abramovholvi's full-sized avatar

Dmitry Abramov abramovholvi

View GitHub Profile
@abramovholvi
abramovholvi / python_request_with_holvi_signature.py
Last active September 17, 2019 15:29
Python HTTP Signature generation Holvi PSD2 Interface
# Script to make GET or POST requests to psd2.holvi.com with HTTP signature and all required headers.
# Python 2.7 and Python 3.5+ compatible.
# requires requests and cryptography packages.
import time
import base64
import datetime
import hashlib
import email.utils
from collections import OrderedDict
@abramovholvi
abramovholvi / postman_pre_request.js
Last active September 19, 2022 18:20
Example Code for Postman to generate HTTP Signature
// Borrowed from https://developer.nordeaopenbanking.com/app/documentation?api=Business%20Accounts%20API&version=1.0
// With some small adjustments to header names
// Load Forge library
// !!!!!!!!!!!!!! Unsafe: it is better to download and compile forge lib
// from https://github.com/digitalbazaar/forge and put it to service managed
// by you instead of using
// https://raw.githubusercontent.com/loveiset/RSAForPostman/master/forge.js
// or just copy whole script to Postman Pre-Script section
if (!pm.globals.has("forgeJS")) {