type Query {
user(id: Int!): User
}
type User {
For this example, we will be using a LDAP docker container on our local machine to authenticate the request. In order to add/modify entries in the LDAP container, we will need the following software:
Additionally, we will need a working Tyk environment to run everything:
This guide is meant to be a distilled version of the information on Tyk's documentation. Refer to the official Tyk documentation for any updates, revisions, or additional details regarding this installation process.
NOTE: This guide is for installing all Tyk components and databases on a single server. This is NOT recommended for a production environment.
This guide is divided into three parts:
package main | |
import ( | |
"net/http" | |
"github.com/TykTechnologies/tyk/ctx" | |
"github.com/TykTechnologies/tyk/headers" | |
"github.com/TykTechnologies/tyk/log" | |
"github.com/TykTechnologies/tyk/user" | |
) |
- Set the Developer Portal listen path via:
tyk_analytics.conf
"host_config": { "enable_host_names": true, "disable_org_slug_prefix": true, "hostname": "", "override_hostname": "xyz:8080", "portal_domains": {}, "portal_root_path": "/portal",
#################### TYK_PMP_PUMPS_MAIN_TYPE=mongo TYK_PMP_PUMPS_MAIN_META_COLLECTIONNAME=tyk_analytics TYK_PMP_PUMPS_MAIN_META_MONGOURL=mongodb://tyk-mongo:27017/tyk_analytics TYK_PMP_PUMPS_MAIN_META_MAXINSERTBATCHSIZEBYTES=80000 TYK_PMP_PUMPS_MAIN_META_MAXDOCUMENTSIZEBYTES=20112
TYK_PMP_PUMPS_MAINAGG_TYPE=mongo-pump-aggregate TYK_PMP_PUMPS_MAINAGG_META_MONGOURL=mongodb://tyk-mongo:27017/tyk_analytics