liip/wp-tyk-dev-portal

Name: wp-tyk-dev-portal

Owner: Liip

Description: A WordPress plugin that adds a developer portal for a Tyk API Gateway

Created: 2016-07-19 07:10:23.0

Updated: 2017-07-10 13:45:52.0

Pushed: 2017-02-28 15:17:51.0

Homepage:

Size: 980

Language: PHP

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Tyk Dev Portal

Contributors: teamamboss, chlab
Tags: api, api-management, tyk, liip
Requires at least: 4.6
Tested up to: 4.6.1 Stable tag: 4.6.1
License: MIT
License URI: https://opensource.org/licenses/MIT

Integrates a developer portal of a Tyk API Gateway in your WordPress site

Description

If you are using the Tyk API Gateway and have a WordPress site you can use this plugin to integrate a developer portal into your site. This is handy when your API requires a complementary website with information e.g. about the service and you want the developer portal in the same place. It's main goal is to offer developer sign up and obtaining access tokens from your WordPress site.

Screenshot 1 Screenshot 2 Screenshot 3

This plugin is a work in progress and currently offers the following features:

What this plugin does not offer:

Support

Please note that we, the plugin authors, cannot offer support for this plugin. The code is on GitHub however and we are happy to accept pull requests fixing bugs or adding functionality. Also feel free to report any issues although we cannot promise when and if they will be fixed.

Installation

define( 'TYK_CONFIGURATION', 'cloud' ); // the tyk setup you're using ('cloud', 'on-premise' or 'hybrid') define( 'TYK_API_ENDPOINT', 'https://admin.cloud.tyk.io/api/' ); // or the url to your Tyk installation define( 'TYK_API_KEY', 'the access token' ); // access token you created for the management user define( 'TYK_AUTO_APPROVE_KEY_REQUESTS', true ); // read more below // these are only needed when TYK_CONFIGURATION is 'on-premise' or 'hybrid' define( 'TYK_GATEWAY_URL', 'https://your.tykgateway.com/tyk' ); // the url of your tyk gateway define( 'TYK_GATEWAY_SECRET', 'the gateway secret' ); // the gateway secret // optional define( 'TYK_FORCE_DISABLE_BOOTSTRAP', false ); // do not include bootstrap styles

Screenshots
  1. Developer Dashboard with token request in WordPress frontend
  2. Usage graph per token and time period
  3. Token usage quota (used / remaining requests)
Changelog
Version 1.2
Version 1.1
Version 1.0
Todos

The following changes are in planning:

Further reading
Automatic key approval

When TYK_AUTO_APPROVE_KEY_REQUESTS is set to true in wp-config.php, key requests will be approved automatically by this plugin. That means a developer will request an access token on the Dashboard page of your WordPress (where this plugin is running) and they will be processed automatically. For this to work, make sure Require key approval is not active in your Tyk Dashboard at Portal Management > Settings.

If you wish to approve key requests manually, set TYK_AUTO_APPROVE_KEY_REQUESTS to false and activate Require key approval mentioned above. When a developer requests an access token, he will get a message with his key request ID. The further process is up to you. Key requests can be approved in the Tyk Dashboard at Portal Management > Key Requests. You could configure an email to be sent out in the Portal Management Settings or do it manually.

Custom dashboard page

The developer dashboard will be displayed in the same layout as your other pages. If you wish to further customize the page, you can create a custom page template and embed the dashboard by using this template tag: <?php tyk_dev_portal_dashboard()?>.

Styling

You may need to fix some styles as this plugin includes a subset of the bootstrap styles with it and the styles of your theme may conflict with some of them. Bootstrap is only included when your theme doesn't already include it. You can set TYK_FORCE_DISABLE_BOOTSTRAP to true to force disable the bootstrap styles in case you need to.

i18n

This plugin is ready for translation and currently supports the following languages:


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.