X-Git-Url: https://git.arvados.org/arvados.git/blobdiff_plain/2b30b239c8c66c3a1a7be35c61a9fb707df1e7ee..b6d7efab2c4bffa3fabd55b166e44cca8ac1391f:/lib/controller/fed_containers.go diff --git a/lib/controller/fed_containers.go b/lib/controller/fed_containers.go index 7fd5b25ad2..a923f757f2 100644 --- a/lib/controller/fed_containers.go +++ b/lib/controller/fed_containers.go @@ -12,8 +12,8 @@ import ( "net/http" "strings" - "git.curoverse.com/arvados.git/sdk/go/auth" - "git.curoverse.com/arvados.git/sdk/go/httpserver" + "git.arvados.org/arvados.git/sdk/go/auth" + "git.arvados.org/arvados.git/sdk/go/httpserver" ) func remoteContainerRequestCreate( @@ -33,9 +33,12 @@ func remoteContainerRequestCreate( creds := auth.NewCredentials() creds.LoadTokensFromHTTPRequest(req) - currentUser, err := h.handler.validateAPItoken(req, creds.Tokens[0]) + currentUser, ok, err := h.handler.validateAPItoken(req, creds.Tokens[0]) if err != nil { - httpserver.Error(w, err.Error(), http.StatusForbidden) + httpserver.Error(w, err.Error(), http.StatusInternalServerError) + return true + } else if !ok { + httpserver.Error(w, "invalid API token", http.StatusForbidden) return true }