Documentation
¶
Overview ¶
Package cache implements middleware caching Authorization header to authenticate user.
Index ¶
Constants ¶
View Source
const ( DefaultAuthExpireTime = 10 * time.Minute DefaultAuthPurseTime = 60 * time.Second AuthenticatedHeader = "go-auth-cache-Authenticated" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Cache ¶
Type Cache stores cache for basic auth, and record.
func NewDefault ¶
func NewDefault() *Cache
NewDefault returns a Cache with default value for AuthCache, RecordCache
func (*Cache) ServeHTTP ¶
func (c *Cache) ServeHTTP(w http.ResponseWriter, req *http.Request, next http.HandlerFunc)
ServeHTTP inform next middleware this request already authenticated by looking into the cache.
Click to show internal directories.
Click to hide internal directories.