move auth token middleware/hooks to middleware package

fix/adds auth token middleware tests
This commit is contained in:
Marcus Efraimsson
2019-02-05 00:21:05 +01:00
parent 7cd3cd6cd4
commit d53e64a32c
8 changed files with 324 additions and 53 deletions
+2
View File
@@ -4,6 +4,7 @@ import (
"strings"
"github.com/grafana/grafana/pkg/log"
"github.com/grafana/grafana/pkg/services/auth"
"github.com/grafana/grafana/pkg/services/session"
"github.com/grafana/grafana/pkg/setting"
"github.com/prometheus/client_golang/prometheus"
@@ -13,6 +14,7 @@ import (
type ReqContext struct {
*macaron.Context
*SignedInUser
UserToken auth.UserToken
// This should only be used by the auth_proxy
Session session.SessionStore