17014: Add mock response to users/current.
[arvados.git] / lib / controller / federation.go
index cab5e4c4ca45172edb28f07210b001456f1e11af..bc93cc9eaf5ce41bd78231a9e165b2086a9f67fc 100644 (file)
@@ -164,6 +164,7 @@ func (h *Handler) validateAPItoken(req *http.Request, token string) (*CurrentUse
                uuid = sp[1]
                token = sp[2]
        }
+
        user.Authorization.APIToken = token
        var scopes string
        err = db.QueryRowContext(req.Context(), `SELECT api_client_authorizations.uuid, api_client_authorizations.scopes, users.uuid FROM api_client_authorizations JOIN users on api_client_authorizations.user_id=users.id WHERE api_token=$1 AND (expires_at IS NULL OR expires_at > current_timestamp AT TIME ZONE 'UTC') LIMIT 1`, token).Scan(&user.Authorization.UUID, &scopes, &user.UUID)