verifyAPIKey

package
v0.0.0-...-bd4d895 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2016 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Overview

A Gozerian plugin that validates an API Key passed in a header by contacting the localhost apid server. If the API Key is valid, the key will be deleted from the header, the data from the server will be stored in the control.FlowData and the request will continue.

Sample Configuration:

Index

Constants

View Source
const DEFAULT_APID_URI = "http://localhost:8181/verifiers/apikey"
View Source
const DEFAULT_KEY_HEADER = "X-Apigee-API-Key"
View Source
const UNAUTHORIZED_MESSAGE = "Unauthorized"

Variables

This section is empty.

Functions

func CreateFitting

func CreateFitting(config interface{}) (pipeline.Fitting, error)

CreateFitting exported function to create the fitting

Types

type ErrResultDetail

type ErrResultDetail struct {
	ErrorCode string `json:"errorCode"`
	Reason    string `json:"reason"`
}

type KMSResponseFail

type KMSResponseFail struct {
	Errinfo ErrResultDetail `json:"result"`
	Type    string          `json:"type"`
}

type KMSResponseSuccess

type KMSResponseSuccess struct {
	Rspinfo map[string]interface{} `json:"result"`
	Type    string                 `json:"type"`
}

Jump to

Keyboard shortcuts

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