Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JWTResult ¶
type JWTResult struct { Algorithm string `json:"algorithm"` ConsumerID string `json:"consumer_id"` CreatedAt int `json:"created_at"` ID string `json:"id"` Key string `json:"key"` Secret string `json:"secret"` }
JSON ritornato quando si crea il JWT
type JWTResults ¶
type KongCustomer ¶
type KongCustomer struct { CreatedAt int `json:"created_at"` CustomID string `json:"custom_id"` ID string `json:"id"` Username string `json:"username"` }
JSON returned from new user request
type KongData ¶
type KongData struct { Customer KongCustomer JWTResult JWTResult JWTResults JWTResults Username string CustomID string Token string Server string }
type KongMiddleware ¶
type KongMiddleware struct { }
func AuthMiddleware ¶
func AuthMiddleware() *KongMiddleware
Middleware is a struct that has a ServeHTTP method
func (*KongMiddleware) ServeHTTP ¶
func (l *KongMiddleware) ServeHTTP(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
The middleware handler
Click to show internal directories.
Click to hide internal directories.