Documentation ¶
Overview ¶
Package auth provides a common auth middleware based on the request header 'Authorization'.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Authorization ¶
func Authorization(handle func(authtype, authvalue string, header http.Header) error) middleware.Middleware
Authorization returns a common middleware named "auth", which parses the request header "Authorization" to two fields, authtype(optional) and authvalue(required), and calls the handle function to finish the authorization that it maybe put them into the header if there some auth information to be passed to the upstream server.
Types ¶
This section is empty.
Directories ¶
Path | Synopsis |
---|---|
Package forward provides a middleware that forward the auth to the external server.
|
Package forward provides a middleware that forward the auth to the external server. |
Click to show internal directories.
Click to hide internal directories.