Skip to content

Instantly share code, notes, and snippets.

@matiasinsaurralde
matiasinsaurralde / instructions.md
Last active May 18, 2018 11:00
Tyk - Existing tokens

These instructions assume you have an API with the settings specified in quickstart.json (see below).

To add this token, save the JSON contents as token.json, then:

curl http://127.0.0.1:8080/tyk/keys/abc -H 'x-tyk-authorization: 352d20ee67be67f6340b4c0605b044b7' -H 'Content-Type: application/json'  -d @token.json

Where abc, in the URL, is your existing key.

@letzya
letzya / test-virtual-endpoint.json
Last active September 25, 2022 08:54
test-virtual-endpoint
{
"id": "XXXXb1957251bab02553XXXX",
"name": "Test virtualEndpoint 2",
"slug": "testvirtual",
"api_id": "XXXX796c5de45e649f22da390d7XXXX",
"org_id": "XXXXd3a0de0dc60001ffXXXX",
"use_keyless": true,
"use_oauth2": false,
"use_openid": false,
"openid_options": {
@asoorm
asoorm / preBodyToHeaders.js
Created July 31, 2018 20:46
jsvm - read xml request body, and pass credentials to b64 encoded Authorization header
marknote=function(){};marknote.constants={DOCTYPE_START:"<!DOCTYPE",CDATA_START:"<![CDATA[",CDATA_END:"]]>",COMMENT_START:"<!--",COMMENT_END:"-->",TAG_OPEN:"<",TAG_CLOSE:">",TAG_CLOSE_SELF_TERMINATING:"/>",ENDTAG_OPEN:"</",EQUALS:"=",SQUOTE:"'",DQUOTE:'"',PI_START:"<?",PI_END:"?>",BRACKET_OPEN:"[",BRACKET_CLOSE:"]",TOKENTYPE_BRACKET_OPEN:"bracketOpen",TOKENTYPE_TAG_OPEN:"tagOpen",TOKENTYPE_TAG_CLOSE:"tagClose",TOKENTYPE_ENDTAG_OPEN:"endTagOpen",TOKENTYPE_ENDTAG_CLOSE:"endTagClose",TOKENTYPE_SELF_TERMINATING:"closeTagSelfTerminating",TOKENTYPE_WHITESPACE:"whitespace",TOKENTYPE_ATTRIBUTE:"attribute",TOKENTYPE_QUOTE:"quote",TOKENTYPE_QUOTED:"quotedLiteral",TOKENTYPE_NORMAL:"normal",TOKENTYPE_COMMENT_START:"commentStart",TOKENTYPE_COMMENT_END:"commentEnd",TOKENTYPE_CDATA_START:"cdataStart",TOKENTYPE_CDATA_END:"cdataEnd",TOKENTYPE_PI_START:"piStart",TOKENTYPE_PI_END:"piEnd",TOKENTYPE_DOCTYPE_START:"docTypeStart",DATATYPE_ATTRIBUTE:"marknote.Attribute",DATATYPE_CDATA:"marknote.CDATA",DATATYPE_CLONER:"marknote.Clone
@asoorm
asoorm / api_definition_preTransformContentType.json
Last active April 25, 2023 17:21
Tyk Gateway JSVM middleware to inspect the Content-Type Header, and if matches, transform it to something else.
{
"id": "5b6973533f03d3608d46cf8c",
"name": "httpbin",
"slug": "httpbin",
"api_id": "e69126ef8100421c4c81b9982b51eb80",
"org_id": "5b296ceb3f03d310fffc9b9d",
"use_keyless": true,
"use_oauth2": false,
"use_openid": false,
"openid_options": {
@asoorm
asoorm / docker-compose-mongo-replicaset.yml
Created September 14, 2018 19:00
Mongo Replica Set docker compose
version: "3"
services:
mongo1:
hostname: mongo1
container_name: localmongo1
image: mongo:4.0-xenial
expose:
- 27017
ports:
- 27011:27017
@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: