From 4a4c6665282c2418bc0518b4c1bc46413402e02b Mon Sep 17 00:00:00 2001 From: Ben Toogood Date: Thu, 2 Apr 2020 18:03:21 +0100 Subject: [PATCH] Remove resolver logic --- api/server/auth/auth.go | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/api/server/auth/auth.go b/api/server/auth/auth.go index 34f4c654..15373277 100644 --- a/api/server/auth/auth.go +++ b/api/server/auth/auth.go @@ -8,7 +8,6 @@ import ( "strings" "github.com/micro/go-micro/v2/api/resolver" - "github.com/micro/go-micro/v2/api/resolver/path" "github.com/micro/go-micro/v2/auth" "github.com/micro/go-micro/v2/logger" ) @@ -16,10 +15,8 @@ import ( // CombinedAuthHandler wraps a server and authenticates requests func CombinedAuthHandler(h http.Handler) http.Handler { return authHandler{ - handler: h, - auth: auth.DefaultAuth, - resolver: path.NewResolver(), - // namespace: + handler: h, + auth: auth.DefaultAuth, } } @@ -70,12 +67,6 @@ func (h authHandler) ServeHTTP(w http.ResponseWriter, req *http.Request) { w.WriteHeader(http.StatusForbidden) } - // WIP: Determine the name of the service being requested - // endpoint, err := h.resolver.Resolve(req) - // fmt.Printf("EndpointName: %v\n", endpoint.Name) - // fmt.Printf("EndpointMethod: %v\n", endpoint.Method) - // fmt.Printf("EndpointPath: %v\n", endpoint.Path) - // Perform the verification check to see if the account has access to // the resource they're requesting err = h.auth.Verify(acc, &auth.Resource{