example

command
v0.0.0-...-6cdb09e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 10, 2016 License: MIT Imports: 8 Imported by: 0

README

Minimal example

Prerequisites

  • Kong installed (tested with v0.8.0)

Configuration

Please change variable kong_server in config.yaml with your Kong gateway IP

Usage

The server runs on localhost:8080

/login
  • Returns a token for the user with username test and custom id 123, if the user test doesn't exist it creates a new user into Kong gateway
  • Make a request to endpoint /login
/endpoint_auth
  • Returns the user authenticated by the Kong gateway.
  • To simulate the gateway, pass these 3 headers during request:
    • X-Consumer-Username and set an username;
    • X-Consumer-Custom-ID and set a custom ID;
    • X-Consumer-ID and set a random alphanumeric string;

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL