Skip to content

Instantly share code, notes, and snippets.

View asoorm's full-sized avatar

Ahmet Soormally asoorm

View GitHub Profile
@bmonteiro
bmonteiro / oktaValidationHandler.js
Last active June 3, 2020 06:12
Tyk Virtual Endpoint for Okta Event Hooks (One-Time Verification Request)
function oktaHandler (request, session, config) {
log("X-Okta-Verification-Challenge: " + request.Headers["X-Okta-Verification-Challenge"]);
b = { "verification" : request.Headers["X-Okta-Verification-Challenge"].toString()};
var responseObject = {
Body: JSON.stringify(b),
Code: 200
};
return TykJsResponse(responseObject, session.meta_data);
}
@tyomo4ka
tyomo4ka / postman-prerequest-tyk-hmac.js
Last active May 8, 2023 12:55
Requests signing using HMAC authentication with TYK Gateway
# An example of adding requests signature using HMAC authentication with TYK Gateway.
var sdk = require('postman-collection'),
apiKey = environment.api_key,
apiSecret = environment.api_secret,
date = (new Date()).toUTCString(),
signatureContentString = 'date: ' + date,
signatureString = CryptoJS.HmacSHA1(signatureContentString, apiSecret).toString(CryptoJS.enc.Base64),
authHeader = 'Signature keyId="' + apiKey + '",algorithm="hmac-sha1",signature="' + encodeURIComponent(signatureString) + '"';
@buger
buger / read.md
Last active March 7, 2024 09:05
API Gateway guide to SOAP

API Gateway guide to SOAP

SOAP is a big and painful topic when it comes to API gateway support. And the reason is that the SOAP protocol itself has a very flexible declarative XML format, and its specifications are unfortunately really vague and leave a lot of things open for interpretation.

In this document, we will try to cover all possible ways how you can integrate SOAP with Tyk API Gateway, from simple pass through to calling WSDL services.

Introduction to SOAP format

A SOAP message is a XML document which is used to transmit your data, and can look as simple as: