Our new gateway product is available at https://github.com/strongloop/microgateway.
NOTE: StrongLoop Gateway strong-gateway
is deprecated as of 03/22/2016.
StrongLoop Gateway is now part of IBM API Connect, as the Micro Gateway for securing and
forwarding requests to a back-end API. For more information, see https://developer.ibm.com/apiconnect.
This demo contains a two-part tutorial and an example app for the StrongLoop API Gateway (API Gateway).
##Overview
###Tutorial
The purpose of this two-part tutorial is to show you how to implement the API gateway as an OAuth 2.0 solution into an existing infrastructure.
####Part 1 - notes-app-plain
notes-app-plain
is a simple web app
that renders a list of notes:
Notes
--------------
- Buy eggs
- Buy milk
- Buy sausages
The notes in this app are not stored on the web server, but are retrieved from a separate server (API server) instead:
(Web Server) (API Server)
+--------+ +----------+
| Client |----->| Resource |
| |<-----| Server |
+--------+ +----------+
In OAuth 2.0 terminology, the web server is a "client" and the API server is a "resource server". We will be building the client and resource server apps in preparation for part 2 of the tutorial.
####Part 2 - notes-app-gateway
notes-app-gateway
is a seven-step tutorial that
demonstrates various features of the StrongLoop API Gateway. In each step, we
incrementally improve on the app from part 1 and cover a variety of topics as
we work through the transformation of notes-app-plain
to notes-app-gateway
.
Upon completion, the client will retrieve notes through the API gateway instead
of interacting directly with the API server:
(Web Server) (API Gateway) (API Server)
+--------+ +---------------+ +----------+
| Client |----->| Authorization |----->| Resource |
| |<-----| Server |<-----| Server |
+--------+ +---------------+ +----------+
###Example - oauth-playground
This is a web app used to demonstrate various OAuth 2.0 Authorization Grant flows:
We also include sample scripts for GUI-less workflows:
npm install -g strongloop
strongloop v4.0.4 (node v0.10.36)
├── [email protected] (f74d03c)
├── [email protected] (3221b91)
├── [email protected] (13baab4)
├── [email protected] (72a249c)
├── [email protected] (f46e58f)
├── [email protected] (e59f8b5)
├─┬ [email protected] (4c3ac51)
│ └── [email protected]
├── [email protected] (5219ef1)
├── [email protected]
└── [email protected]
Check your versions by running
slc -v
or update them by runningnpm install -g strongloop
.
Start with part 1 of the tutorial Then move to part 2 of the tutorial.
Feel free to skip directly to the
oauth-playground
example if you don't
want to go through the tutorials.