func (a *Auth) Authenticate(w http.ResponseWriter, r *http.Request) (*authdb.UserContext, error) {
	if r.URL.Path == "/_session" {
		switch r.Method {
		case kivik.MethodPost:
			return nil, postSession(w, r)
		case kivik.MethodDelete:
			return nil, deleteSession(w, r)
		}
	}
	return a.validateCookie(w, r)
}
// Authenticate authenticates a request with cookie auth against the user store.
Authenticate authenticates a request with cookie auth against the user store.
// Authenticate authenticates a request with cookie auth against the user store .
func (a *Auth) Authenticate(w http.ResponseWriter, r *http.Request) (*authdb.UserContext, error) {
	if r.URL.Path == "/_session" {
		switch r.Method {
		case kivik.MethodPost:
			return nil, postSession(w, r)
		case kivik.MethodDelete:
			return nil, deleteSession(w, r)
		}
	}
	return a.validateCookie(w, r)
}
func ( a * Auth ) Authenticate ( w http . ResponseWriter , r * http . Request ) ( * authdb . UserContext , error ) { if r . URL . Path == " " { switch r . Method { case kivik . MethodPost : return nil , postSession ( w , r ) case kivik . MethodDelete : return nil , deleteSession ( w , r ) } } return a . validateCookie ( w , r ) }
Authenticate authenticates a request with cookie auth against the user store.
Authenticate authenticates a request with cookie auth against the user store .