Remove resolver logic

This commit is contained in:
Ben Toogood 2020-04-02 18:03:21 +01:00
parent 4999f6dfd4
commit 4a4c666528

View File

@ -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"
)
@ -18,8 +17,6 @@ func CombinedAuthHandler(h http.Handler) http.Handler {
return authHandler{
handler: h,
auth: auth.DefaultAuth,
resolver: path.NewResolver(),
// namespace:
}
}
@ -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{