Documentation ¶
Overview ¶
Package auth is a middleware handler for Lagann to authenticate users over the UUID they specified in the X-Lagann-Auth header.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
Struct Auth is a negroni middleware for checking X-Lagann-Auth for the correct uuid
func NewAuth ¶
NewAuth returns a new Auth instance and an error or nil based on the machine and the base path in etcd to look through. A sane default for Flitter is:
/flitter/lagann/apikeys/
func (*Auth) ServeHTTP ¶
func (a *Auth) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc)
This middleware will set the X-Lagann-User to the correct value out of etcd based on the API key in X-Lagann-Auth.
Click to show internal directories.
Click to hide internal directories.