Documentation
¶
Index ¶
Constants ¶
View Source
const (
// Bearer is a prefix of JWT header value
Bearer = "Bearer"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Flags ¶
type Flags struct { AuthHeader string `long:"auth_token_header" default:"X-Elfire-Token" description:"Header field to store auth token"` AuthCookie string `long:"auth_token_cookie" default:"elfire_sso_token" description:"Cookie name to store auth token"` }
Flags is a package flags sample in form ready for use with github.com/jessevdk/go-flags
type Middleware ¶
type Middleware struct { Log *log.Logger Config *Flags Token *jwtutil.App Field string // Context field for Profile data }
Middleware is a struct that has a ServeHTTP method
func (*Middleware) ServeHTTP ¶
func (mw *Middleware) ServeHTTP(w http.ResponseWriter, r *http.Request, next http.HandlerFunc)
ServeHTTP is the middleware handler
Click to show internal directories.
Click to hide internal directories.